# Uploading to S3 without hitting the local server

**URL:** <https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308>\
**Category:** Rails\
**Created:** [April 12, 2009, 12:38am UTC](https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308 "2009-04-12T00:38:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 12, 2009, 12:38am UTC](https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308/1 "2009-04-12T00:38:00Z")

</div>

Hi, I guess my question is rather simple, is it possible to upload to S3  
without hitting the local server using Rails? If so, are there any  
tutorials or similar things around?

PS: and what about being able to display a progress bar at the same  
time? I know I’m pushing it, but I also know there’s no point  
reinventing the wheel, especially not in the Rails world 🙂

Cheers!

---

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 12, 2009, 12:42am UTC](https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308/2 "2009-04-12T00:42:01Z")

</div>

Nope, it is not.

S3 “receives” files by HTTP PUT requests and browsers can’t do PUTs.  
Worse, to do something like that you would have to give your “user”  
your api keys, which isn’t really a good idea.

- 

Maurício Linhares  
[http://alinhavado.wordpress.com/](http://alinhavado.wordpress.com/) (pt-br) | [http://blog.codevader.com/](http://blog.codevader.com/)  
(en)

On Sat, Apr 11, 2009 at 7:38 PM, Steve D.

---

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 12, 2009, 3:47am UTC](https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308/3 "2009-04-12T03:47:27Z")

</div>

Hi Steve,

If you don’t mind using Flex/Flash to do the client side UI, you can  
upload directly to S3 with a progress bar using a POST. The api keys  
get encrypted so no worries about loosing them.  
[http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1092](http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1092)

Good luck,  
Michael

On Apr 11, 3:38 pm, Steve D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![stevedogers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9dc877/32.png) [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Post date:** [April 13, 2009, 6:51am UTC](https://www.ruby-forum.com/t/uploading-to-s3-without-hitting-the-local-server/165308/4 "2009-04-13T06:51:34Z")

</div>

On Sun, Apr 12, 2009 at 12:38 AM, Steve D.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> You can, read more here:  
> [http://docs.amazonwebservices.com/AmazonS3/2006-03-01/UsingHTTPPOST.html](http://docs.amazonwebservices.com/AmazonS3/2006-03-01/UsingHTTPPOST.html)  
> For a progress bar, you will need Flash on the browser (or something  
> similar) or upload to your server.

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain
