11<script setup lang="ts">
2- import axios from " axios" ;
32import { BAlert } from " bootstrap-vue" ;
43import { storeToRefs } from " pinia" ;
54import { computed , ref , watch } from " vue" ;
@@ -24,8 +23,8 @@ const { getDataset, isLoadingDataset } = useDatasetStore();
2423
2524const props = defineProps <Props >();
2625
27- const content = ref ();
2826const contentTruncated = ref ();
27+ const contentChunked = ref ();
2928const errorMessage = ref ();
3029const sanitizedJobImported = ref ();
3130const sanitizedToolId = ref ();
@@ -52,11 +51,11 @@ watch(
5251 () => props .datasetId ,
5352 async () => {
5453 try {
55- const { data, headers } = await axios . get (previewUrl .value );
56- content .value = data ;
57- contentTruncated .value = headers [ " x-content-truncated" ] ;
58- sanitizedJobImported .value = headers [ " x-sanitized-job-imported" ] ;
59- sanitizedToolId .value = headers [ " x-sanitized-tool-id" ] ;
54+ const { headers } = await fetch (previewUrl .value , { method: " HEAD " } );
55+ contentChunked .value = headers . get ( " x-content-chunked " ) ;
56+ contentTruncated .value = headers . get ( " x-content-truncated" ) ;
57+ sanitizedJobImported .value = headers . get ( " x-sanitized-job-imported" ) ;
58+ sanitizedToolId .value = headers . get ( " x-sanitized-tool-id" ) ;
6059 errorMessage .value = " " ;
6160 } catch (e ) {
6261 errorMessage .value = errorMessageAsString (e );
8483 <div v-if =" dataset.deleted" id =" deleted-data-message" class =" errormessagelarge" >
8584 You are viewing a deleted dataset.
8685 </div >
87- <TabularChunkedView v-if =" content && content.ck_data " :options =" { ... dataset, first_data_chunk: content } " />
88- <div v-else-if = " content " class =" h-100" >
86+ <TabularChunkedView v-if =" contentChunked " :options =" dataset" />
87+ <div v-else class =" h-100" >
8988 <div v-if =" isBinary" >
9089 This is a binary (or unknown to Galaxy) dataset of size {{ bytesToString(dataset.file_size) }}. Preview
9190 is not implemented for this filetype. Displaying as ASCII text.
0 commit comments