"Error: Empty file upload result" even though upload was successful and there IS a result!

2,321 views
Skip to first unread message

Yale Spector

unread,
Sep 25, 2012, 2:38:16 PM9/25/12
to jquery-f...@googlegroups.com
Hey folks. I'm using the jQuery File Upload plugin in a Rails application to upload video files to S3 (directly, thanks to CORS support). S3 responds with XML, so I set dataType: "xml". 

Pretty much everything works so far. I can add a file, it shows a progress bar, and once the upload is complete, I can see the file in my bucket with the key that I specified. In the fileuploaddone callback, I inspect data.result and can see the correct XML object with the location URI, bucket name, key, etc, yet somehow the upload shows "Error: Empty file upload result" once its complete.

Does anyone know why this error would appear? Is there any way I can suppress it in the case where I know the upload succeeded?

Any help is appreciated!

Chance Trahan

unread,
Sep 25, 2012, 3:25:29 PM9/25/12
to jquery-f...@googlegroups.com

Your not permitted to make large uploads on your server. Check your php.info and make sure your max upload isn't defaulting to 8 mb if it is, then you need to talk to your host or person running your server to upload the limit.

We have two separate php.ini files that are on our server. He had to manually find it and change for me because he didn't know we had two php.ini files. And this script defaults to the one that your host doesn't know about.

That's what worked for me. You're just blocked from making large uploads by the server default settings in the php.ini files

--
You received this message because you are subscribed to the Google Groups "jQuery-File-Upload" group.
To post to this group, send email to jquery-f...@googlegroups.com.
To unsubscribe from this group, send email to jquery-fileupl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jquery-fileupload?hl=en.
 
 

Yale Spector

unread,
Sep 25, 2012, 3:40:53 PM9/25/12
to jquery-f...@googlegroups.com
I appreciate the suggestion, however it doesn't quite apply to my situation. I'm running my site on a local Ruby on Rails server (no php.ini in this picture) and uploading directly to Amazon S3. The upload is successful in the end, yet I still get the error. Furthermore, this error occurs whether I upload a 4kb file or a 1gb file.

Chance Trahan

unread,
Sep 25, 2012, 3:50:34 PM9/25/12
to jquery-f...@googlegroups.com

Tony might be able to help you figure it out. He seems to know more than I do about stuff like that and he's the one who helped me figure it out. His direct email is T...@eits.ca or you could wait for him to answer your question here. Sorry that I couldn't help you!

Yale Spector

unread,
Sep 25, 2012, 4:40:53 PM9/25/12
to jquery-f...@googlegroups.com
Well it looks like I solved the problem. The XML returned by S3 doesn't really contain anything I care about, so:

@form.bind 'fileuploaddone', (e, data) -> 
  if data.jqXHR.status == 201
    data.result = data.files

In other words, as long as the upload is successful, replace the result with the array of files (which is basically what the plugin expects in the response to begin with). Works for me!
Reply all
Reply to author
Forward
0 new messages