| Page 1 of 1 | [ 4 posts ] |
|
I am using the Connection Manager to upload files, through setForm() / asyncRequest(). When the upload succeeds, callback.upload is properly called. However, when it fails (say because of a connection issue), then callback.failure isn't called.
Is callback.failure supposed to be called, or am I using the API incorrectly? Alex |
|
The file upload use case does not fire either a success or failure event. Instead, the "complete" event is fired since the transaction result cannot be determined from the HTTP response headers.
Regards, Thomas |
|
Hi Thomas,
Thank you for looking into this. I tried to register a listener on the "complete" event: my handler is called when the upload succeeds, but it isn't when the upload fails because of a connectivity issue. You can reproduce this with the example linked below. Select a small file, and click on "Send". It will send it to a page that waits 10 seconds. After about 10 seconds, you'll get alerts for "Complete" and "Success" (upload handler). So far so good. Now do the same, but while the file is uploaded, cut the connection while the upload is in progress (on Windows, I do this by disabling the connection in Network Connections). Uploading will stop right away, but no handler is called. http://www.scdi.org/~avernet/try/yui-upload You can reproduce this with Chrome and IE. With Firefox, I am not sure why, but when submitting the form the whole page is reloaded, not just the iframe. The JavaScript code is inline in the HTML of the page. Alex |
|
Does anyone have an idea on this one? If a form POST, or in general a page load, is interrupted because of a connection issue, is it even possible to know that this happened in JavaScript?
Alex |
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group