Skip to content

Commit c6f247c

Browse files
committed
Updated code snippets paths
1 parent 98ca674 commit c6f247c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/storage/blobs/quickstart-blobs-javascript-browser.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,23 @@ npm install -g parcel-bundler
121121

122122
In Visual Studio Code, open the *package.json* file and add a `browserlist` between the `license` and `dependencies` entries. This `browserlist` targets the latest version of three popular browsers. The full *package.json* file should now look like this:
123123

124-
:::code language="json" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/package.json" highlight="12-16":::
124+
:::code language="json" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/package.json" highlight="12-16":::
125125

126126
Save the *package.json* file.
127127

128128
### Import the Azure Blob storage client library
129129

130130
To use Azure SDK libraries inside JavaScript, import the `@azure/storage-blob` package. Create a new file in Visual Studio Code containing the following JavaScript code.
131131

132-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_ImportLibrary":::
132+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_ImportLibrary":::
133133

134134
Save the file as *index.js* in the *azure-blobs-js-browser* directory.
135135

136136
### Implement the HTML page
137137

138138
Create a new file in Visual Studio Code and add the following HTML code.
139139

140-
:::code language="html" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.html":::
140+
:::code language="html" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.html":::
141141

142142
Save the file as *index.html* in the *azure-blobs-js-browser* folder.
143143

@@ -159,7 +159,7 @@ You'll run the code after you add all the snippets to the *index.js* file.
159159

160160
Add the following code to the end of the *index.js* file.
161161

162-
:::code language="JavaScript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_DeclareVariables":::
162+
:::code language="JavaScript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_DeclareVariables":::
163163

164164
Save the *index.js* file.
165165

@@ -171,31 +171,31 @@ In the following sections, add each new block of JavaScript code after the previ
171171

172172
Add code to access your storage account. Replace the placeholder with your Blob service SAS URL that you generated earlier. Add the following code to the end of the *index.js* file.
173173

174-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_StorageAcctInfo":::
174+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_StorageAcctInfo":::
175175

176176
Save the *index.js* file.
177177

178178
### Create client objects
179179

180180
Create [BlobServiceClient](/javascript/api/@azure/storage-blob/blobserviceclient) and [ContainerClient](/javascript/api/@azure/storage-blob/containerclient) objects for interacting with the Azure Blob storage service. Add the following code to the end of the *index.js* file.
181181

182-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_CreateClientObjects":::
182+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_CreateClientObjects":::
183183

184184
Save the *index.js* file.
185185

186186
### Create and delete a storage container
187187

188188
Create and delete the storage container when you click the corresponding button on the web page. Add the following code to the end of the *index.js* file.
189189

190-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_CreateDeleteContainer":::
190+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_CreateDeleteContainer":::
191191

192192
Save the *index.js* file.
193193

194194
### List blobs
195195

196196
List the contents of the storage container when you click the **List files** button. Add the following code to the end of the *index.js* file.
197197

198-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_ListBlobs":::
198+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_ListBlobs":::
199199

200200
Save the *index.js* file.
201201

@@ -205,7 +205,7 @@ This code calls the [ContainerClient.listBlobsFlat](/javascript/api/@azure/stora
205205

206206
Upload files to the storage container when you click the **Select and upload files** button. Add the following code to the end of the *index.js* file.
207207

208-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_UploadBlobs":::
208+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_UploadBlobs":::
209209

210210
Save the *index.js* file.
211211

@@ -215,7 +215,7 @@ This code connects the **Select and upload files** button to the hidden `file-in
215215

216216
Delete files from the storage container when you click the **Delete selected files** button. Add the following code to the end of the *index.js* file.
217217

218-
:::code language="javascript" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/index.js" id="snippet_DeleteBlobs":::
218+
:::code language="javascript" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/index.js" id="snippet_DeleteBlobs":::
219219

220220
Save the *index.js* file.
221221

@@ -234,7 +234,7 @@ To set up the debugger extension in Visual Studio Code:
234234

235235
Adding a new configuration creates a *launch.json* file and opens it in the editor. Modify the *launch.json* file so that the `url` value is `http://localhost:1234/index.html`, as shown here:
236236

237-
:::code language="json" source="~/azure-storage-snippets/blobs/azure-blobs-js-browser/.vscode/launch.json" highlight="11":::
237+
:::code language="json" source="~/azure-storage-snippets/blobs/quickstarts/JavaScript/V12/azure-blobs-js-browser/.vscode/launch.json" highlight="11":::
238238

239239
After updating, save the *launch.json* file. This configuration tells Visual Studio Code which browser to open and which URL to load.
240240

0 commit comments

Comments
 (0)