file uploads and progress monitoring on on-rev(reposted )
andre at andregarzia.com
Mon Nov 29 12:18:02 EST 2010
The problem is not checking the amount of bytes that arrived, this is easy.
The hard part is informing back the browser and updating the web page. When
you click "upload" the browser will stop receiving communication from the
server such as xmlHTTPRequests and process your upload order. The only way
hijack the upload request and process it "by hand" with websockets or hidden
iframe so that your main web page still responsive and can still pool the
server for progress update while something is happening. This involves
changing the code on the server and on the client-side. The workflow is like
1 - User wants to upload a file
along the token
6 - server receives token and starts to receive file, saves progress for
asking for progress using the token to identify itself
progress is complete
again, non-trivial but can be done. The issue is not on the server but on
the web browser... web browsers are kinda stupid.
http://www.andregarzia.com All We Do Is Code.
More information about the use-livecode