6

I'm using jquery-file-upload plugin to upload some files. I have a bind to the add callback where I collect the files to upload and on form submit i'm issuing the 'send' command to begin the upload.

The problem i'm facing is that the fail callback is called upon successful upload with the following error message: "Uploaded bytes exceed file size"

can anyone explain me what does this error mean? and why I keep getting it?

I appreciate the help.

10x

2
  • Modify the maxFileSize property. Commented Feb 11, 2015 at 12:04
  • 2
    I get this error when file already exists with the same name. Don't know if this could help. Commented May 25, 2017 at 15:23

4 Answers 4

2

I was getting this error as well but I was setting the dataType value to be JSON. I remove the dataType open and stopped getting this error.

This only worked for me as I was not getting Json back

Sign up to request clarification or add additional context in comments.

1 Comment

Not sure why you got a down vote. This turned out to be my problem too for certain IE 9 users. Thanks.
1

I was also getting this kind of error. And it took me a whole day to find the cause of the problem. So, I changed a lot of things and among them:

  • I explicitly set "upload_tmp_dir" directive in php.ini - it was irrelevant;
  • Checked and increased values for both "upload_max_filesize" and "post_max_size" directives in php.ini - it was also not the cause.
  • Created all the folders in my document root directory: "images/" and "images/temp/" - didn't help though is necessary.

The problem was that there was a separate root for AJAX post request for image preliminary upload (Silex/Symfony library), and in the example I copied, the author (deliberately) left out the "url" option from the request, as in:

$('#fileupload').fileupload({
    dataType: 'json',
    url: '/post/upload', // this was missing
    replaceFileInput: false,
    fileInput: $('input:file'), ...  

At the same time, the form, where this element belonged to, had its own route set to "/post/" and, with "url" option missing, the plug-in, obviously took it from the parent form.

As such, no controller was called, the uploaded file was unprocessed, and the text of the error was misleading.

PS. This "auto substitution" by the plug-in might also affect the methods used for request (PUT or POST), as I used both in controllers - "PUT" for the form and "POST" for the fileupload management, but I didn't check.

Comments

0

I tried reviewing all available messages in console and I found this

always: function(e, data) {
    console.log(data.jqXHR.responseJSON.files[0].error);

In my part, I got the error due to the file I'm uploading exceeds the upload_max_filesize directive in php.ini

The won't give the you the exact error.

console.log(data.messages);

Comments

-1

Make sure your form only has inputs that are what AWS expects. Do not add extra form fields of your own. Or if you do, remove them with JS before the AWS upload begins.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.