I'm running Tasks on Microsoft Azure Batch Services, where each task create a set of files on the node. I have to copy these files to a Blob Storage.
The task are created and managed from a vm which is not part of the batch pool
I'm able to acces the node files and i can write the content to a blob storage however this means I get the file as a string on my driving vm and upload it to the blobstorage.
var container = BlobClient.GetContainerReference(containerName);
container.CreateIfNotExists();
var content = nodeFile.ReadAsString();
var blob = container.GetBlockBlobReference(nodeFile.Name);
blob.UploadText(content);
To prevent extra trafic, does anybody know a way I can upload the files directly to the BlobStorage?
I have no control over the exe in the task so uploading it from the task directly is not an option
UploadFromFileAsync
= msdn.microsoft.com/en-us/library/azure/dn451828.aspx or do you mean that dev code dont even want to iterate through the filestream and just uplaod the file as is with some kind of function like for example : "UploadFile(filepath, filename)". Please let me know I can post some detials and sampel as an answer once i understand it right.:)
– Tats_innit