Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing images? Database or Filesystem on the cloud

I'm building a photo sharing app which has to store images. So I am thinking of using Azure mobile services for storing user data and links to their images stored in Azure Storage. The problem I think with this approach is that if the image is modified, there may not be referential integrity.

Is this a good approach or should I be storing both of these in the database(This approach is more expensive, monetarily).

PS: The images are standard images captured using a Mobile Camera.

like image 958
ayushgp Avatar asked Jan 28 '16 17:01

ayushgp


1 Answers

The approach you're thinking about taking (referencing the image from the structured data stored in Azure Mobile Apps) is good.

For the actual image storage, instead of using the file system on the service, the recommended approach would be to leverage something like Azure Blob Storage.

This recently published article about a new file management feature being added to Mobile Apps might be helpful (it should at least serve as guidance on how to manage file storage in the context of a mobile app):

https://azure.microsoft.com/en-us/blog/file-management-with-azure-mobile-apps/

I hope this helps!

like image 198
Fabio Cavalcante Avatar answered Nov 15 '22 05:11

Fabio Cavalcante