Imagine we are writing a web application with a simple registration page containing something like the following:
OK, great, then the user clicks "Create Profile". Ideally, we would like the following to happen.
Our image will be resized on the client (using their processor)
To send this image directly to S3 to a unique holiday destination. (without going through our hosting server, which cost us dino and precious time on our well-developed single-threaded rail application).
To find out when our image was successfully uploaded to S3.
, , , , .
?
, - - , Rails? , , , .
, , .
SwfUpload, ...
http://vimeo.com/11363680
https://github.com/blueimp/jQuery-File-Upload/wiki/Upload-directly-to-S3
, Rails, , ? , ( , ), , .
, , , , , - ...
, , , ( JavaScript).
, Canvas, 1) ( ), 2) , 3) Canvas, , , -, , , .
S3 POST S3 API, , , , . , Ajax... , -. iframe + postMessage, . , - Flash- Gmail ( , ). , - .. , , , , . ( , IMO.)
, , , - , , , .
: S3, iframe, . javascript, . , : dynku heroku, S3 , , S3.
, . . HTML5 .