0

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.

Pranav MS
  • 2,235
  • 2
  • 23
  • 50
yasir kk
  • 161
  • 5
  • 9

1 Answers1

0

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.

yasir kk
  • 161
  • 5
  • 9