Azure file storage access document with direct link
Asked Answered
T

1

6

I'm trying to access files which I'm programmatically uploading to the azure file storage.

But when pasting the direct url:

enter image description here

Any idea how I can directly get that file when I want to download from Azure file storage?

Tubuliflorous answered 27/9, 2016 at 9:2 Comment(0)
M
10

Direct access to files stored in file service is not allowed because the share containing these files has Private ACL and unlike blob containers there's no way to change the ACL of a share.

What you would need to do is create a Shared Access Signature (SAS) on the file that you want to access directly and use that SAS URL. When creating the SAS, please ensure that at least Read permission is included in the SAS as this permission is required to read/download the file.

Please see https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-files/#develop-with-file-storage (Generate a shared access signature for a file or file share) for more details on how you can create a SAS on a file.

Montreal answered 27/9, 2016 at 9:10 Comment(6)
Thanks @gaurav-mantri, this is what I'm getting after generating shared access signature i.gyazo.com/2a01dd0de8726e8aa71a2fda86515692.pngTubuliflorous
Can you please share the code for generating shared access signature? Also, tell us which SDK you're using to create them.Montreal
Ok, it works now, I had to increase the SharedAccessExpiryTime which was set to UTC time. For some reason though the documents which I'm uploading to azure file storage, when downloaded, I'm not able to open them, it looks like they are corrupted, although the correct size is shown. Do you have skype id for quick screenshare if possible? ThanksTubuliflorous
Cool! I would recommend asking a separate question for the problem you're having with uploading files.Montreal
#39722426 pls see if you can help me thanks @gaurav-mantriTubuliflorous
In your scenario, would it be possible to mount Azure Files as SMB share and access files from a drive? You can get full net use command from connect button on portal to achieve this.Hemicellulose

© 2022 - 2024 — McMap. All rights reserved.