11<script setup lang="ts">
22import hljs from " highlight.js/lib/core" ;
33import powershell from " highlight.js/lib/languages/powershell" ;
4- import dayjs from " dayjs" ;
54
65definePageMeta ({
76 middleware: [" auth" ],
@@ -26,17 +25,12 @@ const notUserDownload = user?.id !== request.user_details_id;
2625const dataReady = request .status === " READY" ;
2726const isExpired = request .status === " EXPIRED" ;
2827
29- const expiresAt = request .expires_at
30- ? dayjs .unix (request .expires_at ).format (" MMM D, YYYY HH:mm Z" )
31- : null ;
32-
33- const requestSasUri = request .download_uri ;
28+ const requestSasUri = request .download_uri .replace (
29+ / \? . * / ,
30+ " ?...[SAS Token Omitted]..." ,
31+ );
3432const azcopyCommand = ` azcopy copy "${requestSasUri }" "C:\\ local\\ path" --recursive=true ` ;
3533
36- const copyToClipboard = (text : string = " " ) => {
37- navigator .clipboard .writeText (text );
38- push .success (" Copied to clipboard" );
39- };
4034hljs .registerLanguage (" powershell" , powershell );
4135
4236if (error .value ) {
@@ -116,13 +110,16 @@ if (error.value) {
116110 </p >
117111
118112 <p >
119- This is your SAS URI; please record this for download, click
120- to copy to your clipboard
121- <!-- TODO: santize URL for new structure -->
122- <n-code
123- :code =" requestSasUri"
124- @click =" copyToClipboard(requestSasUri)"
125- />
113+ You will need to generate a SAS URI for your download with the
114+ "Read" and "List" permissions similar to the format below. See
115+ our
116+ <NuxtLink
117+ to =" https://docs.aireadi.org/docs/3/preliminary/azure_storage/azure-token"
118+ target =" _blank"
119+ >Azure Blob Storage documentation</NuxtLink
120+ >
121+ for more information.
122+ <n-code :code =" requestSasUri" />
126123 </p >
127124
128125 <p >
@@ -171,11 +168,7 @@ if (error.value) {
171168 <li >
172169 Open a terminal or powershell instance and execute the
173170 following:
174- <n-code
175- :code =" azcopyCommand"
176- language =" powershell"
177- @click =" copyToClipboard(azcopyCommand)"
178- />
171+ <n-code :code =" azcopyCommand" language =" powershell" />
179172
180173 Where the https URL is the SAS URI you obtained from the
181174 portal and "C:\local\path" is the local path on your target
@@ -204,12 +197,16 @@ if (error.value) {
204197 </p >
205198
206199 <p >
207- This is your SAS URI; please record this for download, click
208- to copy to your clipboard
209- <n-code
210- :code =" requestSasUri"
211- @click =" copyToClipboard(requestSasUri)"
212- />
200+ You will need to generate a SAS URI for your download with the
201+ "Read" and "List" permissions similar to the format below. See
202+ our
203+ <NuxtLink
204+ to =" https://docs.aireadi.org/docs/3/preliminary/azure_storage/azure-token"
205+ target =" _blank"
206+ >Azure Blob Storage documentation</NuxtLink
207+ >
208+ for more information.
209+ <n-code :code =" requestSasUri" />
213210 </p >
214211
215212 <ol >
0 commit comments