azure-blob-storage

How to upload folder into azure automatically?

99封情书 提交于 2019-12-02 23:02:58
问题 Now I have this part of a code, which shows me all folders in the directory. var dirPath = path.join("C:\\", 'ILJATEST'); fs.readdir(dirPath, function (err, files) { if (err) { return console.log('Unable to scan dir ' + err); } files.forEach(function (file) { console.log(file); }); }); And this part, where I can choose file and upload to Azure blob storage when click button. (it's work) document.getElementById('upload-button').addEventListener('click', () => { const file = document

How to upload folder into azure automatically?

五迷三道 提交于 2019-12-02 13:15:53
Now I have this part of a code, which shows me all folders in the directory. var dirPath = path.join("C:\\", 'ILJATEST'); fs.readdir(dirPath, function (err, files) { if (err) { return console.log('Unable to scan dir ' + err); } files.forEach(function (file) { console.log(file); }); }); And this part, where I can choose file and upload to Azure blob storage when click button. (it's work) document.getElementById('upload-button').addEventListener('click', () => { const file = document.getElementById('fileinput').files[0]; blobService.createBlockBlobFromBrowserFile('mycontainer', file.name, file,

Need help downloading image from Azure Blobs using NodeJS

早过忘川 提交于 2019-12-02 06:30:29
问题 I got most of the code from the NodeJS Blob quickstart from azure, I am able to upload files including images successfully and I can see them in the azure storage dashboard just fine. But I can't seem to download them or get a URL to them and I need the url for my database so I can query it and use the url to retrieve the file. The download part of the code in the quickstart isnt so clear to me, it seems to be made for text as the upload is as well. If I go into my azure storage dashboard I

Need help downloading image from Azure Blobs using NodeJS

ぃ、小莉子 提交于 2019-12-01 23:35:32
I got most of the code from the NodeJS Blob quickstart from azure, I am able to upload files including images successfully and I can see them in the azure storage dashboard just fine. But I can't seem to download them or get a URL to them and I need the url for my database so I can query it and use the url to retrieve the file. The download part of the code in the quickstart isnt so clear to me, it seems to be made for text as the upload is as well. If I go into my azure storage dashboard I can see the container and I can see the blob created with the image and I can click on the image and it

Python script to use data from Azure Storage Blob by stream, and update blob by stream without local file reading and uploading

徘徊边缘 提交于 2019-12-01 13:52:10
I have a python code for data processing , i want to use azure block blob as the data input for the code, to be specify, a csv file from block blob. its all good to download the csv file from azure blob to local path, and upload other way around for the python code if running locally, but the problem is my code running on azure virtual machine because its quite heavy for my Apple Air , pandas read_csv from local path does not work in this case, therefore i have to download and upload and update csv files to azure storage by stream without local saving. both download and upload csv are quite

Use wildcards in WASB ListBlobs

蓝咒 提交于 2019-12-01 13:40:44
I'm using Azure .Net SDK to list all blobs from Windows Azure Storage Blob container. let client = account.CreateCloudBlobClient() let container = client.GetContainerReference("my-container") let list = container.ListBlobs("data/2014-*-17/", false) // ! here as you can see i'm trying to filter blobs by wildcarded prefix. UPD Not supported as 07/2019 Unfortunately this won't work as Azure Storage does not allow you to do server-side wild card filtering. Only filtering option available to you server-side is prefix filtering. So what you would do is list blobs names of which starts with data/2014

File length is 0 when recreating file from URI, or original filepath [getExternalFilesDir(String type) vs getFilesDir()]

淺唱寂寞╮ 提交于 2019-12-01 06:45:40
A little bit of background first: this app takes a picture and uploads to an Azure blob storage. The picture is stored in a file (internal storage) using getApplicationContext().getFilesDir(); To upload, I need to call the uploadFromFile(..) function like so: CloudBlockBlob.uploadFromFile(String path); The Azure SDK's uploadFromFile function looks like this: public void uploadFromFile(final String path) throws StorageException, IOException { uploadFromFile(path, null /* accessCondition */, null /* options */, null /* opContext */); } public void uploadFromFile(final String path, final

File length is 0 when recreating file from URI, or original filepath [getExternalFilesDir(String type) vs getFilesDir()]

不羁岁月 提交于 2019-12-01 05:31:04
问题 A little bit of background first: this app takes a picture and uploads to an Azure blob storage. The picture is stored in a file (internal storage) using getApplicationContext().getFilesDir(); To upload, I need to call the uploadFromFile(..) function like so: CloudBlockBlob.uploadFromFile(String path); The Azure SDK's uploadFromFile function looks like this: public void uploadFromFile(final String path) throws StorageException, IOException { uploadFromFile(path, null /* accessCondition */,

How to integrate a WebJob within an Azure Data Factory Pipeline

微笑、不失礼 提交于 2019-12-01 01:51:18
I'am trying to integrate a WebJob inside an ADF pipeline. The webjob is a very simple console application: namespace WebJob4 { class ReturnTest { static double CalculateArea(int r) { double area = r * r * Math.PI; return area; } static void Main() { int radius = 5; double result = CalculateArea(radius); Console.WriteLine("The area is {0:0.00}", result); } } } How do we call this webjob through an ADF pipeline and store the response code (HTTP 200 in case of Success) in azure blob storage? Dec 2018 Update : If you are thinking of doing this using azure function, azure data factory NOW provides

Access remote file contents as a stream using WinSCP .NET assembly

放肆的年华 提交于 2019-11-30 22:13:11
I am trying to open file to read from SFTP using WinSCP .NET assembly as par to my exercise to archive file from SFTP to Azure blob. To upload a blob to Azure, I am using using (var fileStream = inputStream) { blockBlob.UploadFromStream(fileStream); blobUri = blockBlob.Uri.ToString(); } How to get the stream from the file on SFTP server? I managed using SftpClient to get the stream using the following code and it works but unfortunately not able to achieve the same using WinSCP .NET assembly. sftpClient.OpenRead(file.FullName) Can anyone help me how to achieve the same using WinSCP .NET