How to modify file name

Last post 04-09-2013, 9:57 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  04-05-2013, 12:12 PM 77165

    How to modify file name

    Hi

     

         I am using Uploader control and allowing only one file to upload.

        I set ProgressPanelWidth="150" property of control, but when file uploaded successfully, In queue it displays full file name

        with success image or if we make cancel upload it also does samething.

        I want to modify file name with number of fixed characters like 'my test file.....on video upload'.

        How it can be achieved??

       

    Filed under:
  •  04-05-2013, 12:39 PM 77169 in reply to 77165

    Re: How to modify file name

    Hi rajbhagat,

     

    It has two tables. 1 the queue table when uploading. 2 is the attachment table after uploaded. Not sure which one you want to custom.

     

    You can refer to http://www.ajaxuploader.com/document/scr/html/create-custom-queue-table.htm, example1 shows you how to create your own queue table when uploading. Example2 shows you how to create your own attachment table after uploaded. So you can use any style and any file name you want in it.

     

    Regards,

     

    Ken 

  •  04-05-2013, 1:25 PM 77173 in reply to 77169

    Re: How to modify file name

    Hi Ken

     

           I created demo same like provided on http://ajaxuploader.com/demo/simple-upload.aspx 

     

         and gave a file name -

    11_29_2012_studyTimeline_11_29_2012_studyTimeline_11_29_2012_studyTimeline_11_29_2012_study.mp4

    this is just an irrelevant name. 

     

    when file sucessfully uploaded or may user cancel. The file name displays origianal fullname.

    I want two customize this file name. Please remember I used ProgressPanelWidth="150". 

    Filed under:
  •  04-09-2013, 9:57 AM 77187 in reply to 77173

    Re: How to modify file name

    HI rajbhagat,

     

    Please try the example page below, it wil use ... to replace the long file name when uploading.

     

    1. <%@ Page Language="C#" Title="Customize the queue UI" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <style>  
    8.         .AjaxUploaderProgressInfoText  
    9.         {  
    10.            /*use ... to replace the long file name*/  
    11.            display: block;width: 300px;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;  
    12.         }  
    13.           
    14. </style>  
    15. </head>  
    16. <body>  
    17.     <form id="Form1" runat="server">  
    18.         <div>  
    19.             <CuteWebUI:Uploader ID="UploadAttachments1" runat="server">  
    20.             </CuteWebUI:Uploader>  
    21.         </div>  
    22.     </form>  
    23. </body>  
    24.   
    25. <script>  
    26. var uploader=document.getElementById("<%=UploadAttachments1.ClientID %>");  
    27. uploader.handlequeueui=myqueueuihandler;  
    28. function myqueueuihandler(list)  
    29. {  
    30.     return false//hide the queue table;  
    31. }  
    32. </script>  
    33.   
    34. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML