Is robust javascript-only upload of file possible
file-upload, javascript
Solution
No. You can, through a certain amount of hackery, begin a file upload with AJAX, in which case you'll be able to tell when it's finished uploading. That's it.
JavaScript does not have any direct access to files on the visitor's computer for security reasons. The most you'll be able to see from within your script is the filename.
Problem
I want a robust way to upload a file. That means that I want to be able to handle interruptions, error and pauses. So my question is: Is something like the following possible using javascript only on the client. If so I would like pointers to libraries, tutorials, books or implementations. If not I would like an explanation to why it's not possible. Scenario: - Open a large file - Split it into parts For each part I would like to - Create checksum and append to data - Post data to server (the server would check if data uploaded correctly) - Check a web page on server to see if upload is ok - If yes upload next part if no retry Assume all posts to server is accompanied by relevant meta data (sessionid and whatnot).