nathancolgate / s3-swf-upload-plugin

A rails 3 gem which allow user upload files to S3 through an embedded flash directly. All UI has been moved out of flex and can be controlled by CSS and JavaScript callbacks.
http://www.nathancolgate.com
MIT License
317 stars 74 forks source link

Uploads bigger than 2 GB - redux #63

Closed heizusan closed 12 years ago

heizusan commented 12 years ago

A little poking around in javascript showed at least some behavior around a 2 GB limit: When uploading a file that the filesystem reported as 2.9 Gb, the file size reported on the way into the uploader was 2971580103 - actually about 2.75 Gb. But who's counting.

The uploader hung for ever, and when progress events finally came back (I only got 2, and then it hung again), they reported a total byte count of 2147483647 - precisely 2 Gb, and only about 28k uploaded. Now, in a 32 bit system, an unsigned integer (what should be used for something like file size) is limited at 4 Gb. But a signed integer would be limited to 2 Gb. Perhaps there's a problem around the bit depth of flash?

To contrast, a much smaller file (< 1 Gb) hung a short while initially, but the upload was virtually instant, once it did begin.

nathancolgate commented 12 years ago

I think this is a limitation of flash and your system:

http://stackoverflow.com/questions/4240196/upload-file-using-flash-uploaders-what-is-size-limit

"Perhaps it's a limit to 32 bit (2 GB). Using 64 bit, I was able to start the upload progress of a 4 GB file."

heizusan commented 12 years ago

It is a limitation of flash, on 32 bit systems, you are correct. Sorry, we determined that a while ago, and I forgot to report back here.

Is there any thought/possibility to chunking the uploads?

nathancolgate commented 12 years ago

I looks like chunking is a possibility. I've opened a new feature request to see if anyone is interested in doing the leg work.

https://github.com/nathancolgate/s3-swf-upload-plugin/issues/70