'How can I download and directly upload to blob storage without saving the file?

I want to download a file from a direct link. Those files are a between 900mb and 30GB. That's prettly large so I don't want to download them to a temp folder and then upload them. I want to use something like Azure Functions to do this every x hours and the temp storage then becomes pretty limited.

Is there a way to download / download stream and upload simultaneously to blobstorage? I don't want to save it first.

Hope you can help me out



Solution 1:[1]

Is there a way to download / download stream and upload simultaneously to blobstorage? I don't want to save it first.

You don't really need to do it. Azure Storage can do this for you.

You will need to use Copy Blob functionality and provide the URL of the file you wish to transfer and Azure Storage will asynchronously copy the file into blob storage. Please do note that this is an asynchronous operation and you do not have control over when the blob gets copied.

If you want synchronous copy operation, you can take a look at Put Block From URLenter link description here operation. This is where you control how many bytes of data you want to transfer from source to blob storage.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gaurav Mantri