Ahmed Ali
Ahmed Ali

Reputation: 2668

Using Azure Blob to store Azure Tables and vica versa

I'm creating a cloud app that i have to store Texts and Pictures to be used on my app , and i'm using Windows Azure Cloud Storage for that , recently i've created a Separate table to store my Entities and Also a separate Blob to store my images , now i want to know if it's possible to store both Texts and images in Blob or Table ?! and how can i do that ?!

Upvotes: 1

Views: 209

Answers (1)

Sandrino Di Mattia
Sandrino Di Mattia

Reputation: 24895

Yes this is possible:

  • To store text in a Blob you can simply call the UploadText method.
  • To store an image in Table Storage you can store it in a byte[] property (see this blog post). Note that the limit here is 64KB per property with a limit of 1MB for the record but there are ways around that (FatEntity for example).

Now, it's not because you can that you should. It's a common practice to upload the image to blob storage, and simply save the URL to that blob in a Table Storage entity (together with other information like date created, the user who created it, ...).

The GuestBook exercise in the Windows Azure Training Kit is the perfect example: http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_introtowindowsazurelabvs2010_topic2#_Toc313609301

Upvotes: 5

Related Questions