Blankman
Blankman

Reputation: 267000

Is it possible to upload directly without touching my server?

Is it possible to use carrier wave to upload directly to amazon's S3 without using my server?

What i mean is, I don't want the images first going to my ec2 instance, and then uploaded to s3. I believe there is a way to upload directly to S3 to save my server's resources from having to process/stream the file.

I am just looking into carierwave, does it support nice html5 uploads where the user can just drag and drop the file on the web page?

Upvotes: 0

Views: 28

Answers (1)

tildedash
tildedash

Reputation: 71

If you want to upload directly to S3 from the browser you must do it with Javascript. Heroku provides a nice tutorial : https://devcenter.heroku.com/articles/direct-to-s3-image-uploads-in-rails

Once uploaded, you can pass the finale S3 public URL of the image in a hidden field and download it server-side with carrierwave for further manipulation (resizing, ...)

Upvotes: 1

Related Questions