Search code examples
formsextjsuploadprogress

Extjs file upload progress


I have seen form file upload example in ExtJS4 and i need customize progress of the file upload.

I see waitMsg config property, but i don't want use that and i don't want use extjs 3rd party plugins.

So, how i can get simply current upload progress from upload form in extjs?


Solution

  • The waitMsg uses a message box with an infinitely auto-updating progress bar. So you can't just create a progressbar that displays the current upload.

    You could create your own Ext.ProgressBar and estimate the upload time and when its done you set it to the max value. But I guess you don't want that.

    To answer your question: You cannot simply track the current upload progress.


    If you really need this user experience you can try a 3rd party component.


    To quote the docs:

    File uploads are not performed using normal "Ajax" techniques, that is they are not performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the DOM element temporarily modified to have its target set to refer to a dynamically generated, hidden which is inserted into the document but removed after the return data has been gathered.