Forum Discussion

ruwanithanu's avatar
ruwanithanu
Copper Contributor
Jan 28, 2021

Copy File to a server location from Azure file storage

Hi, I have a requirement to
1- generate a file,
2 - save it in Azure File storage,
3 - copy it into an on-prem server location from Azure file storage, When I m debugging it in local it works fine, But after deploying the application in azure, 3rd step is not working not copying the file from file storage to the server,

Any idea, do I need to whitelist the azure web link in the server, if so what is the port that I have to open,
Thanks

2 Replies

  • atulram's avatar
    atulram
    Brass Contributor

    ruwanithanu 

    in step 3 , are you trying to mount the file share, or just copy a file?

     

    1. mount will work once you have 445 port open.

    2. using SAS token you should be able to download file

    3. URL is https://<StorageAccountName>.file.core.windows.net/<fileShare-folder>/<FileName>

    4. you can use AZ copy command line tool

    5. you can use az cli command as on 

    az storage file download --path
                             --share-name
                             [--account-key]
                             [--account-name]
                             [--connection-string]
                             [--dest]
                             [--end-range]
                             [--max-connections]
                             [--no-progress]
                             [--open-mode]
                             [--sas-token]
                             [--snapshot]
                             [--start-range]
                             [--subscription]
                             [--timeout]
                             [--validate-content]

     

     

     

Resources