I created chunk file using jquery slice function
var chunk = blob.slice(start, end);
and append this chunk to new formData
var fd = new FormData();
fd.append('fileToUpload', blobFile);
and send this blob to upload.php file. But i getting only the $_file contain Array
(
[fileToUpload] => Array
(
[name] => blob
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)
)
. My requirement is upload large file into server and i am using file operation for append the received contents to file. My problem is i am not getting the what i passed from jquery and what i get is string "blob". How can i chunked file upload without using plugins.
There is one error triggered. error = 1 means post_max_size error and I reduced the chunk size. The problem solved and now its works perfect and i can upload large file without any packet loss.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.