diff --git a/src/components/meilisearch/ImportDocumentsDrawer.vue b/src/components/meilisearch/ImportDocumentsDrawer.vue index a96ee46..a9c1e5b 100644 --- a/src/components/meilisearch/ImportDocumentsDrawer.vue +++ b/src/components/meilisearch/ImportDocumentsDrawer.vue @@ -174,7 +174,6 @@ watch(uploadContentType, (newVal) => { :multiple="false" :previewWidth="0" :fileLimit="1" - :maxFileSize="20000000" :showUploadButton="false" :showCancelButton="false" :pt="{ diff --git a/src/composables/meilisearch/useDocuments.ts b/src/composables/meilisearch/useDocuments.ts index eba547c..e24a322 100644 --- a/src/composables/meilisearch/useDocuments.ts +++ b/src/composables/meilisearch/useDocuments.ts @@ -65,6 +65,7 @@ export function useDocuments() { } } + // example data: https://github.com/meilisearch/datasets/tree/main/datasets async function addOrUpdateDocumentsFromString( action: 'addition' | 'update', indexUid: string, @@ -255,4 +256,4 @@ export function useDocuments() { confirmDeleteAllDocuments, confirmDeleteDocument, } -} \ No newline at end of file +} diff --git a/src/utils/index.ts b/src/utils/index.ts index 0ce57f6..3e20480 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -76,11 +76,11 @@ export function looksLikeAnImageUrl(value: any) { const url = new URL(value) const path = url.pathname.toLowerCase() return ( - path.endsWith('.jpg') || - path.endsWith('.jpeg') || - path.endsWith('.gif') || - path.endsWith('.png') || - path.endsWith('.webp') + path.includes('.jpg') || + path.includes('.jpeg') || + path.includes('.gif') || + path.includes('.png') || + path.includes('.webp') ) }; @@ -109,4 +109,4 @@ export function readFileAsText(file: File): Promise { reader.readAsText(file) }) -} \ No newline at end of file +} diff --git a/src/views/Tasks.vue b/src/views/Tasks.vue index 1465e0c..b0dc116 100644 --- a/src/views/Tasks.vue +++ b/src/views/Tasks.vue @@ -32,6 +32,7 @@ function showTask(task: Task) { showTaskDrawerOpen.value = true } +// TODO: poll for new tasks // TODO: https://vueuse.org/core/useUrlSearchParams/ // url params for route redirect from index page tasks link, or use qs package? watch(tasksParams, (newValue) => {