plupload icon indicating copy to clipboard operation
plupload copied to clipboard

There is no access to "response" JSON data to find server side errors

Open lionkmp opened this issue 4 years ago • 0 comments

Hi all. Thank you for the great uploader component!

Your example contains this code:

die('{"OK": 1}');

But in some cases programmers would want to return errors, like your chunked example shows:

die('{"OK": 0, "info": "Failed to open output stream."}');

Such returned JSON data in "ChunkUploaded" Event comes as part of the "info" parameter

ChunkUploaded: function (up, file, info)

But when the file is smaller than one chunk, this event is not fired. Only these events, but they lack the returned JSON "info" object so I cannot process server side errors.

UploadProgress: function (up, file) or UploadComplete: function (up, files)

So I'm asking for access to returned JSON data in all cases. If I'm not missing a point. Thanks!

Of course I would prefer to avoid HTTP error 500, as that would trigger a lot of other server side things. Such simple errors with saving file are usually not so dramatic. (I'm using ASP.NET.)

lionkmp avatar Jul 03 '20 12:07 lionkmp