moxiecode/plupload — Issue #444: FileUploaded is often not firing properly when uploading to Amazon
Author: emirotin
Created: 2011-12-19 08:47:16+00:00
State: open

We are going to use your plugin for a number of big projects for famous vendor. Currently we experiment using the free license, but in case of success we'll buy an OEM license.

The plugin is embedded into an upload control, and the testing page can be found here: http://seredov.flux-dev.com/GT/widgets-dev.html, this uses the uncompressed JS, so you can see how the Plupload is instantiated and events are bound.

When you click somewhere inside the widget it asks for the authorization, you can create an account.
Then please use any small video file, upload it - you should see the blue progress bar below the file name.

I have to bind to the FileUploaded event because I need the server response for some pieces of information about the file registered on the server side.
The file is uploaded to Amazon, then on server response I send an AJAX request to our server finalizing the upload, and then after the success the video details editing screen is shown.

Sometimes it works, but more often the upload is stuck (often at 100%, sometimes somewhere in the middle).

Sample Amazon HTTP response in case of "success"

HTTP/1.1 400 Bad Request
x-amz-request-id: 119A2032E4DA3376
x-amz-id-2: qiB5BVVChWR5SR+lh5Jjp+5X5hqZIKfi8GyEh0I2iAIyj5B7sOUMHPAILEGXK2xX
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Mon, 19 Dec 2011 08:30:58 GMT
Connection: close
Server: AmazonS3

15c

RequestTimeoutYour socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.119A2032E4DA3376qiB5BVVChWR5SR+lh5Jjp+5X5hqZIKfi8GyEh0I2iAIyj5B7sOUMHPAILEGXK2xX
0

More often it says

HTTP/1.1 504 Fiddler - Receive Failure
Content-Type: text/html; charset=UTF-8
Connection: close
Timestamp: 11:44:11.614

ReadResponse() failed: The server did not return a response for this request.

(as you see, I'm using Fiddler to inspect requests and responses, but it's clearly reproducible with Fiddler switched off).

Any help is appreciated as this issue is critical for Plupload adoption.