tel8618217223380 / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

TActiveFileUpload progress indicator is misleading #178

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current implementation of TActiveFileUpload's progress indicator is 
misleading as it signals completion of the file upload already then, when 
only the file has been transferred to the server, but the callback for the 
control hasn't been completed yet. If the latter one takes more than a 
fraction of a second (for ex. because you want run a virus scan against 
the newly uploaded file or do some other processing - like resizing an 
image or whatever -, then the user is mislead into believing of successful 
completion of the file upload*, when the server might actually reject the 
download in the callback. (*which is technically true, as the contents of 
the file have been actually transferred to the server side, only, the 
contents of the file didn't get processed yet, nor did the server code get 
the change to do anything with that file yet, what the user really cares 
about, in my opinion and in common sense) 

This also generates a pure technical problem (beyond UI design), because 
till the callback doesn't return the file upload control stalls in an 
undefined state, in which trying to re-use it for uploading another file 
or progress from the current page to another one might result in 
unpredictable behaviour, both on server side, and also on the client (for 
ex. you can get javascript errors when you try to proceed from the current 
page while the callback is in progress).

Therefore I've modified the original activeupload.js file (see attachment, 
original base from 3.1.5) to have an extra step/state after the file 
upload, when the callback is occouring, and only set the status of the 
upload control upon completion (either with success or failure) of that 
callback. This gives a more accurate status feedback to the user regarding 
the upload process and also prevents concurrency errors resulting from the 
misleading status display. 

The modifications should be fully backward compatible with existing prado 
code and can be used as a drop-in replacement for the original javascript 
file for the control.

Original issue reported on code.google.com by google...@pcforum.hu on 16 Jun 2009 at 7:07

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by google...@pcforum.hu on 16 Jun 2009 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Christophe.Boulain@gmail.com on 22 Jul 2009 at 6:22