Uploading a file and getting back its URL with AWS

I was playing with Amazon Web Services (AWS) over the weekend, trying out a few things including Amazon S3 for file storage. Unfortunately I could not find a quick and easy way to upload an image and retrieve its URL in single call in the AWS SDK…so I got creative

With the AmazonS3 interface from the AWS SDK, you have to make separate calls to put your object in their server and to retrieve it. To encapsulate this I wrote an extension class that performs those 2 operations.

Et voila! Ni vu, ni connu

Advertisements
Uploading a file and getting back its URL with AWS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s