none
Copy file from Web App to Storage

    Întrebare

  • Hello,

    we need some help to get the best choice for transfer client files from Web App hosted on Azure (files are in the wwwroot folder) to Azure storage.

    Actually clients save personal files in a directory identified by own id.

    These are most important requirements with some doubts:

    1. Client Authorization on directory;
    2. Files backup;
    3. Preview and Updating files on the actually WebApp;
    4. any solution for transferring all file with some tool (-> AzCopy?);

    We see both Blob Storage and FileStorage, but we are confused. Does these option meet our requirements?

    Thank you for any help about.

    David


    15 mai 2018 10:46

Răspunsuri

  • Yes. You can Use Azure Blob storage for storing your data and have your app talk to this to get data. This would give you as much storage as you want, but obviously your app needs to know how to talk to blob storage. Azure Blob storage is useful for massive-scale, cloud-native applications that need to store unstructured data. To maximize performance and scale, Azure Blob storage is a simpler storage abstraction than a true file system.

    Also, check out the suggestions mentioned in the documentation Get started with Azure Blob storage using .NET for using blob storage with WebApps.

    --------------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here

    16 mai 2018 17:51
    Moderator

Toate mesajele

    1. What exactly you are trying to do? See  Authentication and authorization in Azure App Service
    2. What type of backup you are looking? See it might help you Back up a web app in Azure App Service
    3. Could you little elaborate the scenario? If you are looking to update web.config file see this link
    4. Yes, you can transfer the files using Azcopy.
            

    Refer :     Securing PaaS web and mobile applications using Azure Storage

                      https://stackoverflow.com/questions/36298620/copy-empty-folders-with-azcopy

                      How To Copy Files From An Azure App Service With PowerShell

    5. See  Deciding when to use Azure Blobs, Azure Files, or Azure Disks

    15 mai 2018 17:09
    Moderator
  • Hello Sandeep BR,

    thank you for your answer.

    I try to explain my project and what we'd like to do better.

    Actually we have a web app on Azure, every clients save their files on the web app in the wwwroot folder, in subfolders. 

    Problem: backup on Azure for WebApp cannot be larger than 10 GB (actually web site is about 40 GB size), and on wwwroot files can be accessed everywhere if you know the url.

    So, the requirements are to move files on another place like Blob Storage or File Storage, moving files on subfolders which can be accessed only if you know the credentials, so if you are logged in the website, you can see your files of your virtual directory on Blob or Files Storage.

    Can Blob Storage meet all of these requirements?

    Thanks,

    David


    16 mai 2018 07:41
  • Yes. You can Use Azure Blob storage for storing your data and have your app talk to this to get data. This would give you as much storage as you want, but obviously your app needs to know how to talk to blob storage. Azure Blob storage is useful for massive-scale, cloud-native applications that need to store unstructured data. To maximize performance and scale, Azure Blob storage is a simpler storage abstraction than a true file system.

    Also, check out the suggestions mentioned in the documentation Get started with Azure Blob storage using .NET for using blob storage with WebApps.

    --------------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here

    16 mai 2018 17:51
    Moderator
  • Hey Davide ,

    Just checking in to see if the above suggestions helped or you need further assistance on this issue.

    18 mai 2018 13:38
    Moderator
  • Thanks Sandeep,

    next week I try to implements all discussed points.

    David

    18 mai 2018 14:05
  • Hi Sandeep,

    I try to use AzCopy to transfer my data from wwwroot folder to a container on Blob Storage, but I'm getting this error:

     The syntax of the command is incorrect. The source azure storage location type can not be inferred. Use /sourceType:blob to specify the location type explicitly.

    Command used: AzCopy /Source:https://***..../upload/ /Dest:https://***.blob.core.windows.net/blobstfiles /DestKey:********* /S

    I try to upload from my own PC and it works.

    I try even with ****.scm.azurewebsites.net:443... but even i get this error: "The syntax of the command is incorrect. Invalid SAS token in parameter "Source". The syntax of the command is incorrect. Invalid SAS token in parameter "Source"."

    Any ideas?

    Thanks a lot,

    David

    24 mai 2018 18:20
  • Hi David,

    Modify your webapp at the points you read/write to wwwroot and read/write from/to the blob storage instead (see link from Sandeep)

    You can easily download the content of your wwwroot folder from kudu, just zip the wwwroot folder and download local, from there, upload to blob storage and a one off migration. You can do this via the Debug Console -> CMD, navigate to the site folder and click the first icon before the wwwroot folder to create a zipfile and download it.

    Remco


    24 mai 2018 18:57
  • Please surround your whole source argument with quotes, since it contains special characters to command prompt. Refer similar discussion on the stack overflow .

    --------------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on  your forum experience, click here


    26 mai 2018 19:32
    Moderator