locked
How to upload content like images, doc etc on File Share Storage Directory? RRS feed

  • Question

  • How to upload content like images, doc etc on File Share Storage Directory? Can someone please help with full process.

    I have tried below things till now but not able to proceed further.

    can we upload files by using APIs? we are able to create a file by firing some rest APIs. Is there any header key to send my file to Azure file storage? if not then which rest API can upload a file to Azure file storage?

    Monday, April 16, 2018 6:32 PM

All replies

  • There are several ways to uploading data to Azure File Storage, you could upload files via using the Azure portal, Azure storage explorer. REST API for storage supports some operations, more info can be found bellow: 

    Portal:https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-portal
    Storage Explorer: https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-storage-explorer
    Rest API operations that are supported can be found here: https://docs.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api 

    Monday, April 16, 2018 7:40 PM
  • I am looking to upload content to File Share Storage via PHP code.

    Idee Consultancy

    Tuesday, April 17, 2018 7:52 AM
  • Hello Adam,

    Thanks for your response. I am looking to upload content on Azure file share via PHP code inside a directory.

    I am using CREATE API and PUT RANGE API from azure file storage REST API's list. In CREATE API -  I am using headers "x-ms-type:file", "x-ms-content-length:102","Content-Length:0" .

    it is working and creating file but I want to know how to send file from my local to Azure File storage using these two Api's. In put range Api my header's are like this "x-ms-write:update", "x-ms-range:0-101","Content-Length:" like this.

    Could you please help me here?

    Regards,

    Vivek Tiwari


    Idee Consultancy

    Tuesday, April 17, 2018 12:46 PM
  • Thanks for reaching out Vivek, I'm not familar with implementing a solution in PHP but I'd recommend using the PHP library for file storage found here: https://github.com/Azure/azure-storage-php/tree/master/azure-storage-file  and the PHP API reference and documentation for Files here: http://azure.github.io/azure-storage-php/ 
    This should guide you in the correct route since you already have the PHP knowledge. 
    Tuesday, April 24, 2018 9:01 PM