This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
How to run this project
Create a storage account using the Azure portal
If you don't have an Azure subscription, create a free account before you begin.
First, create a new general-purpose storage account to use for this quickstart.
- Go to the Azure portal and log in using your Azure account.
- On the Hub menu, select New > Storage > Storage account - blob, file, table, queue.
- Enter a name for your storage account. The name must be between 3 and 24 characters in length and may contain numbers and lowercase letters only. It must also be unique.
Deployment modelto Resource manager.
Account kindto General purpose.
Replicationto Locally Redundant storage (LRS).
Storage service encryptionto Disabled.
Secure transfer requiredto Disabled.
- Select your subscription.
resource group, create a new one and give it a unique name.
- Select the
Locationto use for your storage account.
- Check Pin to dashboard and click Create to create your storage account.
After your storage account is created, it is pinned to the dashboard. Click on it to open it. Under SETTINGS, click Access keys. Select a key and copy the CONNECTION STRING to the clipboard, then paste it into Notepad for later use.
Clone this repo and install Azure Storage Node.js client library
To complete this quickstart, make sure Node.js is correctly installed and then clone this repo.
git clone https://github.com/Azure-Samples/storage-blobs-node-quickstart
Install Azure Storage Node.js client library by typing following commands:
Configure your storage connection string
In the application, you must provide your storage connection string to create a
BlobService object. Open the
index.js file in your IDE. Replace AzureStorageConnectionString with your connection string.
var connectionString = 'AzureStorageConnectionString'; var blobService = storage.createBlobService(connectionString);