none
Microsoft Access and Photos stored in Azure Blob Storage

    Question

  • I would like to use a Microsoft Access application to upload scanned images to Azure Blob Storage.  I am using SQL Azure for the backend database but would potentially rather not store the images in SQL Azure. 

    In addition, I would like to display these scanned images on a form with respect to their associated data stored within SQL Azure.  I would like the users of the application to be able to use the Access application to upload these images from right within the application and not from an external source since these images need to be associated to particular records within the SQL Azure data tables.

    Any ideas, directions, or thoughts are greatly appreciated.  Perhaps this is not even possible.

    Friday, January 06, 2012 1:42 AM

Answers

  • Hi - thanks for the question - Without knowing more about your application, it's hard to provide specific guidance, but here are some thoughts on your options.

    First, Neil raises a good point about security.  The application doing uploads will need storage credentials, and this gives them full control of your storage account.  Alternatively, there are some solutions where you could use Shared Access Signatures to give the user temporary write permissions to a blob or blob container, but this (like the proxy service Neil recommended) would require an additional web service to distribute the shared access signatures.  I'll let you evaluate the security needs of your application and choose a solution accordingly.  Let me know if you'd like more information on one of those methods.

    Once you've worked through any security issues, we expose a REST API for storage.  You can code directly against it, making HTTP(S) calls to upload/download photos as blobs.  I'm not familiar with programming in Access, but if you can use C#, you may also be able to use our StorageClient library to facilitate this.  If the photos can be made public, then downloading them for viewing can be done with a simple http url, without any additional code.

    Hope that helps - let me know if any of that gets you closer, or if you have additional questions!


    -Jeff
    Monday, January 09, 2012 7:36 PM

All replies

  • -- I would like the users of the application to be able to use the Access application to upload these images from right within the application

    The immediate and most significant issue is that this would require you to embed your Windows Azure Storage and SQL Azure credentials inside the Access application. This would leave them open to discovery by a malicious individual. The next most significant issue is that SQL Azure connections must get through a firewall so you would need to open the SQL Azure firewall to each user of the Access application. The best way to handle these issues would be to proxy the data access through a web service or web site hosted in Window Azure. This reduces the problem to one of authenticating the Access users to the web service or web site which then can use the Windows Azure Storage and SQL Azure credentials securely to access the backend storage.

    This is the same issue faced by Windows Phone applications so you might want to look at the WP7 examples in the Platform Training Kit for some guidance on how to resolve these issues.

    Friday, January 06, 2012 7:48 AM
  • Hi Neil, thanks for the reply.

    I do not have any issues using Microsoft Access with SQL Azure.  The item I am not sure how to do is the integration between Azure Storage and Access.

    I have already developed applications for Access that integrate with SQL Azure, but I have never integrated an Access application with Azure Storage.

    Perhaps the best, easiest, simplest solution for now is to use SQL Azure for the storage of the images.

     

    thanks,

    Friday, January 06, 2012 1:16 PM
  • Hi - thanks for the question - Without knowing more about your application, it's hard to provide specific guidance, but here are some thoughts on your options.

    First, Neil raises a good point about security.  The application doing uploads will need storage credentials, and this gives them full control of your storage account.  Alternatively, there are some solutions where you could use Shared Access Signatures to give the user temporary write permissions to a blob or blob container, but this (like the proxy service Neil recommended) would require an additional web service to distribute the shared access signatures.  I'll let you evaluate the security needs of your application and choose a solution accordingly.  Let me know if you'd like more information on one of those methods.

    Once you've worked through any security issues, we expose a REST API for storage.  You can code directly against it, making HTTP(S) calls to upload/download photos as blobs.  I'm not familiar with programming in Access, but if you can use C#, you may also be able to use our StorageClient library to facilitate this.  If the photos can be made public, then downloading them for viewing can be done with a simple http url, without any additional code.

    Hope that helps - let me know if any of that gets you closer, or if you have additional questions!


    -Jeff
    Monday, January 09, 2012 7:36 PM
  • Isn't it possible to create a user account with write permissions only and not delete or administration permissions on Azure Storage?

    I cant just code some code and have the user able to send images to Azure storage?   I need a shared access signature?  (not sure what this is)

    I understand API, but what is REST?  I have come across this blog talking a bit about REST with excel.  Not sure if I can use this example to get to where I want to go or not:

    http://developer.webtrends.com/community/dx/blog/2009/10/19/dissecting-the-sample-excelvba-application

     Can I use the storageclient library with VBA?  Where would I find it? 

     

    Thanks for your help,

     

    Friday, January 13, 2012 7:58 PM
  • I have been doing some research into my questions and have found, downloaded and installed the Windows Azure SDK.  This gives me the reference that one would need if programming in VB.net to access the azure blob storage.  Unfortunately, the reference will not work with VBA.  I thought I was getting close, but just not quite.

     

     

    Friday, January 13, 2012 11:24 PM
  • Another thought, correct me if I am wrong, but here is what I think I will do.

     

    Use VB.net to create a custom dll that basically does all the uploading of the image to azure blob storage.  I would then register this dll on the deployment machines, I would reference this dll from with VBA.  I could then call the azure storage upload functions from within Access.  I would pass the file path location to the dll and then the dll would take that image, upload it and get a return url path.  The dll would return the dll path to Access for the application to store for later retrieval.  In theory, I think it should work.  Ideas?  Thoughts?

     

    thanks,

     

    Friday, January 13, 2012 11:41 PM
  • So I was able to accomplish what I wanted to do.  Please feel free critique my methodolgy.

     

    I have created the dll file with VS that accepts the current saved file path of the image, and an Azure Storage container name.  From Access, I add this as a reference.  I then pass the file path and container name and execute an upload function within the dll file.  The dll then creates/or uses the container specified and then uploads the image file.  If the container needs created, it is created with public permissions.  Since everything was passed to the upload function from Access, I know exactly what the path is, so I store that in the database for later retrieval when needed.

     

    It all works.  I am not sure if hte public permissions is the best, but mostly, I just need to make sure the files cannot be deleted unless the user has the accesskey.  Is this a correct assumption?

     

    Thanks,

    Saturday, January 14, 2012 4:14 AM
  • I am trying to accomplish the same think, upload images and docs from an Access app and would be interested in your dlls.

    Thanks,

    Cork Shunk

    CS-Graphx

    Saturday, February 18, 2012 3:55 PM