cybermatatu / dnd-file-upload

Automatically exported from code.google.com/p/dnd-file-upload
0 stars 0 forks source link

how to access the "response" from an upload? (for error handling) #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a php script server side to handle the upload that checks the file 
extension (for example)

2. Try to upload a non allowed extension

3. The response coming back from the php script (like echo 
json_encode("message"); ) is displayed in the "response" part of the firebug 
console
But how can I access this data from the $.fn.dropzone.uploadFinished function 
to display the message?

Original issue reported on code.google.com by pierre.b...@gmail.com on 5 May 2011 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the same issue, seems like $.fn.dropzone.uploadFinished returns the info 
of the file you just sent.
I my case I managed to solved it by doing an additional request on 
$.fn.dropzone.uploadFinished to obtain the information of last upload, but I 
had to set dropzone to numConcurrentUploads : 1

Original comment by rga...@gmail.com on 9 May 2011 at 9:54