Results 1 to 1 of 1
Aug 8, 2012, 18:25 #1
- Join Date
- Sep 2003
- 0 Post(s)
- 0 Thread(s)
Having trouble implementing Resumable.js (handles uploading/resuming large files)
I'm trying to get Resumable.js working but have been running into difficulties. It's an upload helper script which uses the HTML5 File API to support resumable uploads with extremely large file sizes (my use case involves uploading extremely large video files of 30 to 150GB each through the browser, so something that can handle internet connection loss, browser crashes/restarts, etc and be able to resume where the upload last left off is critical for me). I know this solution only works in the latest Chrome/Firefox browsers, but that's ok in my case. This script is the only thing I've come across so far (aside from some Java applets, which I'd prefer to avoid if possible) that claims to handle uploading huge files correctly (with resume capabilities), though if you have other suggestions I'd be happy to hear.
Here are the steps I've taken so far:
- I've downloaded the Resumable.js files from Github, and determined that the files located in the samples/Node.js/public actually appear to be the most complete "demo" files that come with the script, even though they're in the Node.js folder (I'm planning to use PHP not Node.js). I placed the contents of the public folder in the root of my web directory, along with the copy of the resumable.js file.
- I created a file in my web root called upload.php and pasted in the code found in Backend on PHP.md.
- I edited index.html to point to my local copy of the resumable.js file, instead of the one on Github.
- I created an "upload" folder at my web root, in case it needs that.
And here is where I'm stuck. I've read through the code in resumable.js and Backend on PHP.md, but it's not clear to me how exactly to connect the two together. If I leave resumable.js and index.html untouched and try to upload something, it "appears" to try uploading (to where, I'm not sure - nothing appears on my server in the web root, upload folder, or /tmp directory), though the upload stops at 90% or so and just stays there. There's a configuration line in both resumable.js and index.html called "target" which I'm not sure if it is referring to "where to save the uploaded files" or the backend handling script (upload.php in my case). So I've tried pointing this setting at upload.php, but nothing seems to happen (if I try uploading, it instantly says the upload was successful, no matter how large a file I test with). If this configuration doesn't refer to the backend script, then I can't see any other place in any of the code to connect the two together.
Anyhow, any advice or tips on what to do would be greatly appreciated!