Closed carlworx closed 11 years ago
Why the page is refreshing ? It shouldn't and backbone-upload-manager
code can't cause that behaviour...
If data.message
contains an error message, "Unknown remote error" should be 2nd argument of filefail
event listener.
@carlworx any news ?
@sroze
apologies for the delayed response, I tried it on another page and it worked, I could not replicate the error so it must be some other code that is causing this. Marking this issue as closed. Thanks. :)
BTW, how do I use the upload manager without the deffered-view-loader?
I want to be able to just use my templates located at the same page.
Well, I think that's not possible right now, I (or we) need to change some things. I purpose that you create an other issue for that point, I'll do that in few days (but maybe more than 1 week). If you can send me a pull request that allow to use defered-view-loader but don't force, I would be thanking !
File: backbone.upload-manager.js Function: Backbone.UploadManager.bindProcessEvents()
this.uploadProcess.on('fileuploadfail', function (e, data) { $.each(data.uploadManagerFiles, function (index, file) { var error = "Unknown error"; if (typeof data.errorThrown == "string") { error = data.errorThrown; } else if (typeof data.errorThrown == "object") { error = data.errorThrown.message; } else if (data.result) { if (data.result.error) { error = data.result.error; } else if (data.result.files && data.result.files[index] && data.result.files[index].error) { error = data.result.files[index].error; } else { error = "Unknown remote error"; } } self.trigger('filefail', file, error); }); })
Description:
'fileuploadfile' is firing event even if the file was successfully posted to the server. data.state is "error" and data.message says something like Uploaded bytes is more than maximum size.
The whole page refreshes after thus not showing the error on the file view.