Reading a file directly from Azure File Share

RebelliousPlum 1 Reputation point
2022-07-08T04:56:41.793+00:00

Is there a way to read a file directly from Azure File Share?

The only examples I see are to download the file and then read it locally on your machine, but that does not seem feasible long term for my use case. What other methods exist? I saw REST in the documentation but it does not go further into how to set that up?

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,160 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,679 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,181 Reputation points
    2022-07-08T21:15:53.78+00:00

    @RebelliousPlum Thank you for reaching out to Microsoft Q&A. I understand that you want to read a file from Azure File Share directly instead of accessing it locally and want to know how to achieve the same.

    To do that, you can use tools like Storage Explorer to access files in your file share. From your application, you can use storage client libraries, REST APIs, PowerShell, or Azure CLI to access your files in the Azure file share.

    You can also configure Azure Files to allow access to files via REST (HTTP/HTTPS) using SAS keys. Get File (REST API) - Azure Storage | Microsoft Learn

    For web browsers they may run into a conditional headers issue and the workaround is here.

    Hope this helps. Please let us know if you have any further questions and we will be glad to assist you further. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.