@@ -8,6 +8,7 @@ import { usePersistentToggle } from "@/composables/persistentToggle";
88import { useDatasetStore } from " @/stores/datasetStore" ;
99import { useDatatypesMapperStore } from " @/stores/datatypesMapperStore" ;
1010import { useDatatypeStore } from " @/stores/datatypeStore" ;
11+ import { withPrefix } from " @/utils/redirect" ;
1112import { bytesToString } from " @/utils/utils" ;
1213
1314import DatasetError from " ../DatasetInformation/DatasetError.vue" ;
@@ -56,6 +57,9 @@ const showError = computed(
5657const isAutoDownloadType = computed (
5758 () => dataset .value && datatypeStore .isDatatypeAutoDownload (dataset .value .file_ext )
5859);
60+ const downloadUrl = computed (
61+ () => withPrefix (` /datasets/${props .datasetId }/display ` )
62+ );
5963const preferredVisualization = computed (
6064 () => dataset .value && datatypeStore .getPreferredVisualization (dataset .value .file_ext )
6165);
@@ -195,7 +199,7 @@ watch(
195199 <h4 >Download Required</h4 >
196200 <p >This file type ({{ dataset.file_ext }}) will download automatically when accessed directly.</p >
197201 <p >File size: <strong v-html =" bytesToString(dataset.file_size || 0, false)" /></p >
198- <a :href =" `/datasets/${datasetId}/display` " class =" btn btn-primary mt-2" download >
202+ <a :href =" downloadUrl " class =" btn btn-primary mt-2" download >
199203 <FontAwesomeIcon :icon =" faFileAlt" class =" mr-1" /> Download File
200204 </a >
201205 </div >
@@ -222,7 +226,7 @@ watch(
222226 <h4 >Download Required</h4 >
223227 <p >This file type ({{ dataset.file_ext }}) will download automatically when accessed directly.</p >
224228 <p >File size: <strong v-html =" bytesToString(dataset.file_size || 0, false)" /></p >
225- <a :href =" `/datasets/${datasetId}/display` " class =" btn btn-primary mt-2" download >
229+ <a :href =" downloadUrl " class =" btn btn-primary mt-2" download >
226230 <FontAwesomeIcon :icon =" faFileAlt" class =" mr-1" /> Download File
227231 </a >
228232 </div >
0 commit comments