You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--sku Standard_LRS --kind blobstorage --access-tier hot
70
+
az storage account create --name $blobStorageAccount --location southeastasia --resource-group myResourceGroup --sku Standard_LRS --kind blobstorage --access-tier hot
71
+
71
72
```
72
73
73
74
## Create Blob storage containers
@@ -79,17 +80,15 @@ Get the storage account key by using the [az storage account keys list](/cli/azu
79
80
The *images* container's public access is set to `off`. The *thumbnails* container's public access is set to `container`. The `container` public access setting permits users who visit the web page to view the thumbnails.
80
81
81
82
```azurecli-interactive
82
-
$blobStorageAccountKey=$(az storage account keys list -g myResourceGroup \
echo "Make a note of your Blob storage account key..."
92
90
echo $blobStorageAccountKey
91
+
93
92
```
94
93
95
94
Make a note of your Blob storage account name and key. The sample app uses these settings to connect to the storage account to upload the images.
@@ -104,6 +103,7 @@ The following example creates an App Service plan named `myAppServicePlan` in th
104
103
105
104
```azurecli-interactive
106
105
az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku Free
106
+
107
107
```
108
108
109
109
## Create a web app
@@ -116,6 +116,7 @@ In the following command, replace `<web_app>` with a unique name. Valid characte
116
116
$webapp="<web_app>"
117
117
118
118
az webapp create --name $webapp --resource-group myResourceGroup --plan myAppServicePlan
119
+
119
120
```
120
121
121
122
## Deploy the sample app from the GitHub repository
@@ -127,27 +128,24 @@ App Service supports several ways to deploy content to a web app. In this tutori
127
128
The sample project contains an [ASP.NET MVC](https://www.asp.net/mvc) app. The app accepts an image, saves it to a storage account, and displays images from a thumbnail container. The web app uses the [Microsoft.Azure.Storage](/dotnet/api/overview/azure/storage), [Microsoft.Azure.Storage.Blob](/dotnet/api/microsoft.azure.storage.blob), and the Microsoft.Azure.Storage.Auth namespaces from the Azure Storage client library to interact with Azure storage.
128
129
129
130
```azurecli-interactive
130
-
az webapp deployment source config --name $webapp \
App Service supports several ways to deploy content to a web app. In this tutorial, you deploy the web app from a [public GitHub sample repository](https://github.com/Azure-Samples/storage-blob-upload-from-webapp-node). Configure GitHub deployment to the web app with the [az webapp deployment source config](/cli/azure/webapp/deployment/source) command.
137
137
138
138
```azurecli-interactive
139
-
az webapp deployment source config --name $webapp \
App Service supports several ways to deploy content to a web app. In this tutorial, you deploy the web app from a [public GitHub sample repository](https://github.com/Azure-Samples/storage-blob-upload-from-webapp-node-v10). Configure GitHub deployment to the web app with the [az webapp deployment source config](/cli/azure/webapp/deployment/source) command.
146
145
147
146
```azurecli-interactive
148
-
az webapp deployment source config --name $webapp \
The sample web app uses the [Azure Storage Client Library](/dotnet/api/overview/azure/storage) to request access tokens, which are used to upload images. The storage account credentials used by the Storage SDK are set in the app settings for the web app. Add app settings to the deployed app with the [az webapp config appsettings set](/cli/azure/webapp/config/appsettings) command.
160
158
161
159
```azurecli-interactive
162
-
az webapp config appsettings set --name $webapp --resource-group myResourceGroup \
az webapp config appsettings set --name $webapp --resource-group myResourceGroup --settings AzureStorageConfig__AccountName=$blobStorageAccount AzureStorageConfig__ImageContainer=images AzureStorageConfig__ThumbnailContainer=thumbnails AzureStorageConfig__AccountKey=$blobStorageAccountKey
161
+
167
162
```
168
163
169
164
# [Node.js V2 SDK](#tab/nodejs)
170
165
171
166
The sample web app uses the [Azure Storage Client Library](https://docs.microsoft.com/javascript/api/azure-storage) to request access tokens, which are used to upload images. The storage account credentials used by the Storage SDK are set in the app settings for the web app. Add app settings to the deployed app with the [az webapp config appsettings set](/cli/azure/webapp/config/appsettings) command.
az webapp config appsettings set --name $webapp --resource-group myResourceGroup --settings AzureStorageConfig__ImageContainer=images AzureStorageConfig__ThumbnailContainer=thumbnails AzureStorageConfig__AccountName=$blobStorageAccount AzureStorageConfig__AccountKey=$blobStorageAccountKey AZURE_STORAGE_CONNECTION_STRING=$storageConnectionString
172
+
183
173
```
184
174
185
175
# [Node.js V10 SDK](#tab/nodejsv10)
186
176
187
177
The sample web app uses the [Azure Storage Client Library](https://github.com/Azure/azure-storage-js) to request access tokens, which are used to upload images. The storage account credentials used by the Storage SDK are set in the app settings for the web app. Add app settings to the deployed app with the [az webapp config appsettings set](/cli/azure/webapp/config/appsettings) command.
188
178
189
179
```azurecli-interactive
190
-
az webapp config appsettings set --name $webapp --resource-group myResourceGroup \
0 commit comments