Html 5 File upload

I've been trying to get Html 5 file uploading to work. I just don't seem to "get it". So rather than tell you about all the problems I'm facing I was wondering if someone has already nicked this in the bud and would be willing to help.

Nice to have features would be 1. File upload progress 2. Time left 3. Some sort of confirmation once upload has completed

Answers


Uploading large file is equal to grabbing maximum resources from CPU and putting the user agent in block state, so we need to avoid these two things, for that we have to upload the large file as multiple parts(chunks), so we have to slice the file and we have to upload in background.

HTML5 introduced some APIs, useful APIs for uploading large file are webworkers and File API. These two are helpful while uploading large file, we have to upload slice the file at client side to make the file as chunks then we need to upload at background to increase the performance of CPU.

For slicing the File API has slice call

var chunk=file.webkitSlice(start,stop)||file.mozSlice(start,stop);

we have to process the uploading in background Using Webworkers to free the user agent.

var worker=new worker('worker.js');
worker.postMessage(FileList);

Need Your Help

In Eclipse how to automatically print current date/time in the comments?

eclipse comments datetime

I have element-level comments in my code & I need to say when was the last time I modified a piece of code. Since it might be difficult to do this automatically when I save the document in ques...

The specified child already has a parent. You must call removeView() on the child's parent first (Android)

java android android-edittext textview parent-child

In my app, I have to switch between two layouts frequently. The error is happening in the layout posted below.