How to retrieve some photos stored on Amazon with Ruby on Rails

N

Nik

Hello all!

Thanks for reading my post first!

Would anyone be kind enough to instruct me to link my photos I uploaded
to Amazon S3 (by using JungleDisk) on my Ruby on Rails app?

If there's already an article, could you kindly point me to it?

Thank you very much!

Nik
 
J

James Britt

Nik said:
Hello all!

Thanks for reading my post first!

Would anyone be kind enough to instruct me to link my photos I uploaded
to Amazon S3 (by using JungleDisk) on my Ruby on Rails app?

If there's already an article, could you kindly point me to it?

To get stuff via http, the object has to be publicly readable.

You can then make a URL from the default s3 domain and the bucket name +
object name

For example, rubyaz.org uses s3 to serve some images.

The bucket name is

/e3static.rubyaz.org/images/


An object is

cyclonemap.jpg


So the URL is

http://s3.amazonaws.com/e3static.rubyaz.org/images/cyclonemap.jpg

If you want to use a nice URL that maps to your application domain, you
need to do some DNS CNAME stuff.

Then you can do this:

http://e3static.rubyaz.org/images/cyclonemap.jpg


If there's something else you need to do that is Rails related, you
would do better to ask on the Rails mailing list.
 
G

Giles Bowkett

I had some issues with that lib, and did better with net-amazon-s3:

http://wonko.com/files/net-amazon-s3/doc/

Actually, I have to admit, I haven't used it at all. About three days
before it was announced I finished up the S3 component of a Rails
site. What I'd done was pretty simple, I just took the existing S3
demo code from Amazon and wrapped it in a Bucket object which knew how
to save files to itself. The only tricky part was getting files to
stream, and that was a very small fix I found on a blog at
missiondata.com.
 
J

Jan Svitok

hello...
i am doin a project where i need to design a web user interface..
the environment i am using is LINUX.
for doing web application things on windows environment we use IIS server
and ASP.
...

Please don't hijack threads, start your own thread with a proper subject.
That way you will not disturb the original topic as you have done now,
and people will more likely notice your question.

Technically: please don't use the "Reply" button, use the "New mail" instead.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top