Moving images to blob storage

Coordinator
Jun 25, 2010 at 12:17 AM

Man downloading images from source control takes forever. Let's move them to the database.

Developer
Jul 23, 2010 at 2:13 AM

I *think* I just uploaded them all under the blob container 'gimages' (Didn't want to collide if someone else uploads as 'images').  However I was unable to see the uploaded images using Azure Storage Explorer: http://azurestorageexplorer.codeplex.com

I'm pretty sure it did upload though, because if I run the app again I get the exception "The specified Blob already exists".  I'm thinking Azure Storage Explorer might not handle the mimetype?  Does anyone know of a good tool to explore blob storage?

I'll upload the source code for the uploader once I can verify it is indeed working, although it is very rough code we banged out at the meeting: (no tests, no exception handling, nothing - not for the faint of heart)

Developer
Jul 23, 2010 at 2:44 AM

I was able to verify the blobs did upload by using the Azure Simple Storage Viewer: http://blogs.msdn.com/sergeim/archive/2008/12/24/azure-storage-viewer.aspx

We will probably want to rename the blobs, currently it is just the fullpath-filename based on my local system.  I would have used just the filename, but we probably don't want to lose some of the folder-structure - all of the Firestarter images have ugly names. Anyone have any thoughts?

Developer
Jul 23, 2010 at 2:55 AM

Microsoft provides a very cool REST interface for blob storage. You can see the list of images uploaded here:

http://bostonazureweb.blob.core.windows.net/gimages?restype=container&comp=list

and follow the "URL" for each item to see the actual image.  It actually worked!

Full docs for the REST blob service API: http://msdn.microsoft.com/en-us/library/dd135733.aspx

Developer
Aug 10, 2010 at 10:58 PM
After talking about this at today's meeting, we determined it probably makes most sense to give these some sort of 'file' structure in the name. The current thinking is that all meeting-related photos will be named "meetings/[meetingId]/imgname.ext" and all other images in a miscellaneous directory. This will require a bit of up front work to move the images into this directory before uploading, but having this structured from the start should help us in the future. The obvious use case being a gallery: 'return me all of the images from meeting id x', something we can't do right now.
Coordinator
Aug 13, 2010 at 12:26 PM
Sounds very good, George. Two questions:

1. What are you thinking we ought to use for the blob Container name?

We can set up a matching subdomain (e.g., images.bostonazure.org) so that code for the site will be able to refer to images as http://images.bostonazure.org/meetings/3/foo.png (that should work fine, right?).

Or, even fancier, we could use ASP.NET routing rules to make it so that http://www.bostonazure.org/images/meetings/3/foo.png resolves properly as well. Anyone know how to do that?

2. Should the "meetings" folder be singular or plural? (.../meetings vs. .../meeting)

Cheers,
-Bill

On Tue, Aug 10, 2010 at 6:58 PM, georgebabey <notifications@codeplex.com> wrote:

From: georgebabey

After talking about this at today's meeting, we determined it probably makes most sense to give these some sort of 'file' structure in the name. The current thinking is that all meeting-related photos will be named "meetings/[meetingId]/imgname.ext" and all other images in a miscellaneous directory. This will require a bit of up front work to move the images into this directory before uploading, but having this structured from the start should help us in the future. The obvious use case being a gallery: 'return me all of the images from meeting id x', something we can't do right now.

Read the full discussion online.

To add a post to this discussion, reply to this email (bostonazure@discussions.codeplex.com)

To start a new discussion for this project, email bostonazure@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Aug 14, 2010 at 2:15 PM
Tried the Azure Storage Explorer you reference (http://azurestorageexplorer.codeplex.com) - it crashes on me when I try to mess with blobs! - and I'm not up for debugging it right now. It also has an OSS license (CDDL) that makes my head hurt. I did try to look at gimage with http://myazurestorageaccount.com (logging in with bostonazureweb and key you already have). If you do that, try "Edit" blob on gimage versus test and test2 - both test and test2 allow me to make them public access, but gimage does not ever produce the Edit dialog.. not sure why. If you want to upload your blob loader code, I can have a hack at it. -Bill
georgebabey wrote:

I *think* I just uploaded them all under the blob container 'gimages' (Didn't want to collide if someone else uploads as 'images').  However I was unable to see the uploaded images using Azure Storage Explorer: http://azurestorageexplorer.codeplex.com

I'm pretty sure it did upload though, because if I run the app again I get the exception "The specified Blob already exists".  I'm thinking Azure Storage Explorer might not handle the mimetype?  Does anyone know of a good tool to explore blob storage?

I'll upload the source code for the uploader once I can verify it is indeed working, although it is very rough code we banged out at the meeting: (no tests, no exception handling, nothing - not for the faint of heart)

Developer
Sep 11, 2010 at 4:42 PM

Sorry for the delayed reply... got busy and moved at the end of the month.

To address your points:

1. Blob container should just be images I think. Describes what is in the container. I'm sure we'll have non-meeting related images that can be stored there as well, just with a different name. The naming scheme will differentiate them.

2. /meeting (singular) probably makes more sense. ex: /images/meeting/1/abc123.jpg   That said mixing the plural (images) with singular (meeting) looks a little strange ... I don't have strong feelings either way.

Also, the Azure Storage Explorer I first reference was the one I couldn't get working. The Azure Simple Storage Viewer does seem to work.  I have to run for now, but will upload the images to blob storage as noted above, we can change the names later if we decide a different naming scheme is better. I'll also upload the blob uploader source.