Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3641

Transitioning from deprecated Azure PHP SDK to Azure CLI for blob storage operations

$
0
0

We have used the PHP SDK to download, list, and upload files to Azure Blob Storage. However, since Microsoft has deprecated the PHP SDK, our client has requested that we transition to the recommended solutions.

We attempted to use the Azure CLI command to upload a file. Here is the code we used:

az storage blob upload --account-name <account name> --container-name <container name> --name <blob name> --file <folder/sub-folder/file name> --sas-token DefaultEndpointsProtocol=https;AccountName=<account name>;AccountKey=<account key>

Unfortunately, it did not work. After searching on Stack Overflow, we found a link that assists with the upload process, partially solving our problem.

Calling the Azure Storage REST API directly from PHP

We are now trying to use this example to download files, but we are unsure what needs to be changed, apart from the URL, to download the file.

Update:We found the download file solution on Stack Overflow. Here is the link.

Download blob using PHP using shared access key

We are still searching for Delete file API.


Viewing all articles
Browse latest Browse all 3641

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>