Uploading images directly to S3 using Rails / Heroku when they enter the registration form (or something like this)

Scenario

Imagine we are writing a web application with a simple registration page containing something like the following:

  • Name
  • Email
  • Password
  • Profile picture

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, , ? , ( , ), , .

, , , , , - ...

+3
2

, , , ( JavaScript).

, Canvas, 1) ( ), 2) , 3) Canvas, , , -, , , .

S3 POST S3 API, , , , . , Ajax... , -. iframe + postMessage, . , - Flash- Gmail ( , ). , - .. , , , , . ( , IMO.)

, , , - , , , .

0

: S3, iframe, . javascript, . , : dynku heroku, S3 , , S3.

, . . HTML5 .

0

All Articles