[CLOSED] multiple file upload and file size at client side

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    Quote Originally Posted by Daniil View Post
    Please use:
    App.FileUploadField1.button.fileInputEl
    Hi Daniil thanks that did the work.

    @tk.Mageztik if you still need the solution for ext 2.x, basically take the same code as above and change the following:
     <ext:FileUploadField
                        ID="FileUploadField1"
                        runat="server"   
                        ButtonText="Add Files"
                        Icon="Add"        
                        ButtonOnly="true"
                        AllowBlank="false"                                                 
                        >
                        <Listeners>
                            <render Handler="SetMultipleUpload( this, #{UpdateLabel}) ;" />
                            <Change Handler="if(!UpdateUploadInfo(this.button.fileInputEl.dom, #{UpdateLabel})) {this.reset();
                             SetMultipleUpload( this, #{UpdateLabel})}"/>                        
                        </Listeners>               
                        </ext:FileUploadField>
    And

     var SetMultipleUpload = function (fileupload, label) {
            fileupload.button.fileInputEl.set({ multiple: 'multiple' });
     
            if (Ext.isIE) {
                label.setText('IE does not support multiple file upload, to use this feature use Firefox or Chrome');
            }
        }
  2. #12
    @mirwais, thank you for sharing a final solution.
  3. #13

    button.fielInputEl is null or not an object

    Hi Guys,

    Well this still works in ext 2.1?

    Ext Version: 2.1
    Error: button.fielInputEl is null or not an object

    Also,

    there's an error adding

    <ext:FormPanel>
    <Listeners><ClientValidation Handler="" />
    </Listeners>
    </ext:FormPanel>
    Ext.Net.FormPanelListeners does not have a public property names 'ClientValidation'
    Last edited by Daniil; Nov 19, 2012 at 3:22 PM. Reason: Please use [CODE] tags
  4. #14
    Quote Originally Posted by ftonacao View Post
    Hi Guys,

    Well this still works in ext 2.1?

    Ext Version: 2.1
    Error: button.fielInputEl is null or not an object

    Also,

    there's an error adding

    <ext:FormPanel>
    <Listeners>
    <ClientValidation Handler="" />
    </Listeners>
    </ext:FormPanel>

    Ext.Net.FormPanelListeners does not have a public property names 'ClientValidation'
    Hi
    yes this will work with some minor changes maybe:
    I have no problems with fileupload.button.fileInputEl.set({ multiple: 'multiple' });, but the ClientValidation event is not there anymore, probably use ValidationChange instead, or another mechanism not to postback to the server when there are no files selected. Like using a "before listener" in save button:
      <ext:Button ID="SaveButton" runat="server" Text="Save">
                        <DirectEvents>
                            <Click
                                OnEvent="UploadClick" Before="return #{FileUploadField1}.button.fileInputEl.dom.files.length>0" >                           
                                <EventMask ShowMask="true" />
                            </Click>                         
                        </DirectEvents>
                    </ext:Button>
  5. #15
    The thread is related to this one.
    http://forums.ext.net/showthread.php?23299
  6. #16
    The thread is related to this one.
    http://forums.ext.net/showthread.php?25421
  7. #17

    Error from clientvalidation

    hello guys,

    i want to use the above code for ext 2.x. However, i got an error "Type 'Ext.Net.FormPanelListeners' does not have a public property named 'clientvalidation'.".
    How can i solve it?

    Those code with error:
    <Listeners>
          <clientvalidation handler="#{SaveButton}.setDisabled(!valid);"/>
    </Listeners>
  8. #18
    Hi @cwtsang1012,

    Please search for "clientvalidation" here:
    https://examples2.ext.net/#/Getting_...EAKING_CHANGES

    Here is some general tips about migrating from v1 to v2.
    http://forums.ext.net/showthread.php...ll=1#post79239
  9. #19

    Problem Solved!

    Thank you so much! it does work now!
  10. #20
    Sorry for bringing this thread back again, but I think my issue is related enough.

    When uploading several files, is it possible to have a visual feedback after each file finishes uploading?

    The only useful listeners/events I found in the FileUploadField control is FileSelected. I tried refreshing the GridPanel that contains the file names after each one is uploaded but that didn't work: the grid is only refreshed after the whole process is complete.
    I see that in Ext.Net 2.x, the MultiUpload control has several cool listeners, like UploadProgress and UploadComplete. Is there a way to do something like that with Ext.Net 1.0?

    Thanks and regards,

    Andrew
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] How to identify upload file size before uploading in IE?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 29, 2012, 5:54 PM
  2. Replies: 2
    Last Post: Jan 17, 2012, 8:58 AM
  3. [CLOSED] Validate file size using FileUpload in client side
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 28, 2011, 4:12 PM
  4. Replies: 1
    Last Post: Jun 23, 2011, 9:37 AM
  5. Maximum file size for upload
    By CoolNoob in forum 1.x Help
    Replies: 3
    Last Post: Jan 07, 2010, 3:57 PM

Tags for this Thread

Posting Permissions