save an image from URL to Azure storage directly - node.js

I am a newbie in the Azure storage. Is there any way to save an image from URL to Azure storage directly without downloading the image?

Copy Blob REST API can satisfy your requirement, you just need to specify the image URL as the source Blob.
If you're developing with C#, you can leverage StartCopy method.
If you're developing with node.js, you can leverage startCopyBlob method.

Related

Azure Storage : How to upload a .pdf or .docx file using Rest API

Recently I have been working on adding documents to Azure storage using blob and file share. But then I realized that in file share using rest API I can upload in two steps
Creating a file
Adding content
I am able to doing that but my requirement here is to upload the .pdf, .docx document at once
and then there should be a way to download them as well.
Could some one please help.
Thanks
Unfortunately, there's no batch download capability available in Azure Blob Storage. You will need to download each blob individually. What you could do is download blobs in parallel to speed things up.
There is an alternative way you can approach using C# or PowerShell.
Would recommend you to please go through this MS document :
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-scalable-app-download-files?tabs=dotnet
And this one also
https://azurelessons.com/upload-and-download-file-in-azure-blob-storage/
Reference: How to download multiple files in a single request from Azure Blob Storage using c#?

Use Azure computer vision API on images stored on BlobStore

I am trying to integrate Azure computer vision api's, and I would like to access the images stored on Azure blob storage.
The documentation mentions about running vision API's on remote URLs, however I am not able run them on- URL of images stored on Azure blob storage.
Is it possible to run Azure Computer vision APIs on images stored on Blob storage ?
I can reproduce this problem if I change my blob container access level to private(anonymous access) it will show bad request. So I suppose the problem is the image url is not accessible.
So one solution is change the access level to Blob or Container, then you image blob url will be accessible.
Another solution is Hong Ooi provide, use the sas url to access the image blob. And about how to generate sas url, the simplest way is generate it from the portal like below pic, click the Generate SAStoken and URL, it will give you the sas url. If you want a sample code, you could refer to this:Create a service SAS for a container or blob with .NET.

Azure Storage Blob with CodeIgnitor

I'd have a PHP {codeigniter} application that i want to migrate to its storage service from AWS S3 to Blob Storage,The application uploads all media files to S3 bucket and S3 generates a link that is stored to the database in which the media file can be accessed from,I want to do the same with azure Blobs storage.I'm facing technical hindrance as i can't find the right resources {libraries/code samples} achieve this goal.Tried the Azure PHP SKD but it didn't work out.
Actually, there is a detailed sample for using Azure Storage PHP SDK. You may refer to: https://github.com/Azure/azure-storage-php/blob/master/samples/BlobSamples.php
To run that sample, you just need to replace the following place with your own value:
$connectionString = 'DefaultEndpointsProtocol=https;AccountName=<yourAccount>;AccountKey=<yourKey>';
Suggestion:
I see that you want to generate an access url and store it in database. I am not familiar with AWS S3, but with Azure Storage you may need to set public access level on container or blob.
Otherwise, you can not access the blob directly. You may need to created a SAS token.

Direct upload to Azure blob storage using Plupload

I am trying to use Plupload to directly upload to Azure blob storage. From what I understand Azure requires a PUT request for uploading a file to a blob storage and Plupload only supports POST requests. Is there a way to setup plupload to make a PUT request? Or alternatively is there a way to upload directly to Azure using a POST request?
I think the Azure Storage JavaScript Client Library for Browsers can help you. Here is a guide

Azure Blob storage and HDF file storage

I am in the middle of developing a cloud server and I need to store HDF files ( http://www.hdfgroup.org/HDF5/ ) using blob storage.
Functions related to creating, reading writing and modifying data elements within the file come from HDF APIs.
I need to get the file path to create the file or read or write it.
Can anyone please tell me how to create a custom file on Azure Blob ?
I need to be able to use the API like shown below, but passing the Azure storage path to the file.
http://davis.lbl.gov/Manuals/HDF5-1.4.3/Tutor/examples/C/h5_crtfile.c
These files i am trying to create can get really huge ~10-20GB, So downloading them locally and modifying them is not an option for me.
Thanks
Shashi
One possible approach, admittedly fraught with challenges, would be to create the file in a temporary location using the code you included, and then use the Azure API to upload the file to Azure as a file input stream. I am in the process of researching how size restrictions are handled in Azure storage, so I can't say whether an entire 10-20GB file could be moved in a single upload operation, but since the Azure API reads from an input stream, you should be able to create a combination of operations that would result in the information you need residing in Azure storage.
Can anyone please tell me how to create a custom file on Azure Blob ?
I need to be able to use the API like shown below, but passing the
Azure storage path to the file.
http://davis.lbl.gov/Manuals/HDF5-1.4.3/Tutor/examples/C/h5_crtfile.c
Windows Azure Blob storage is a service for storing large amounts of unstructured data that can be accessed via HTTP or HTTPS. So from application point of view Azure Blob does not work as regular disk.
Microsoft provides quite good API (c#, Java) to work with the blob storage. They also provide Blob Service REST API to access blobs from any other language (where specific blob storage API is not provided like C++).
A single block blob can be up to 200GB so it should easily store files of ~10-20GB size.
I am afraid that the provided example will not work with Windows Azure Blob. However, I do not know HDF file storage; maybe they provide some Azure Blob storage support.

Resources