Authentication fail for azure file connectivity vai curl request

mohit sharma 21 Reputation points
2020-12-14T06:13:45.317+00:00

I am not able to connect with AZure Files with Access key by curl request from php code but i can conect to SAS token. can anyone help me to connect with access key?

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,220 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 45,406 Reputation points Microsoft Employee
    2020-12-14T06:53:34.323+00:00

    @mohit sharma Are you getting any error message or error code while connecting via curl request? If so, can you share the screenshot?
    Adding more info: We have the Azure Storage Library for PHP but this requires PHP 5.6 or above. To upload to Azure Files via REST API two calls are required. First, you need to Create a File. Once the file has been successfully created you use Put Range to add the contents. For some examples, you might want to refer to this blog post.

    // Getting authentication scheme : https://github.com/Azure/azure-storage-php/blob/master/azure-storage-file/src/File/FileRestProxy.php
    azure-storage-php:https://github.com/Azure/azure-storage-php