0

Can I upload image files from a Web Part to Azure blob storage? My add-in is a SharePoint hosted add-in and I can only use javascript. I tried some searching but no results..

1 Answer 1

0

You need to understand that code running in a SharePoint Hosted app will run under the security context of the currently logged in user. This means that every user who uses this functionality must have the appropriate permissions to upload blobs into your Azure container. You could hard-code the keys in code, but in JavaScript they'll be easily viewable to anyone who cares to see them.

If you really want to go down this path, check out the documentation for the Put Blob REST endpoint, and make sure to review the Azure Storage authentication protocols as well.

1
  • I will be using an API to get the Shared Access Secret and that will do the work. Thanks for the answer, it helped me to avoid the hard-coding part.
    – Dave
    Commented Jun 9, 2016 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.