Browse Source

Allow any types on jsonl

pull/1310/head
Hironsan 3 years ago
parent
commit
aa4e3789bb
2 changed files with 13 additions and 2 deletions
  1. 2
      app/api/views/upload/catalog.py
  2. 13
      frontend/pages/projects/_id/upload/index.vue

2
app/api/views/upload/catalog.py

@ -37,7 +37,7 @@ class JSON(Format):
class JSONL(Format): class JSONL(Format):
name = 'JSONL' name = 'JSONL'
accept_types = 'application/jsonl'
accept_types = '*'
class Excel(Format): class Excel(Format):

13
frontend/pages/projects/_id/upload/index.vue

@ -42,7 +42,7 @@
<pre>{{ example }}</pre> <pre>{{ example }}</pre>
</v-sheet> </v-sheet>
<file-pond <file-pond
v-if="selected"
v-if="selected && acceptedFileTypes !== '*'"
ref="pond" ref="pond"
chunk-uploads="true" chunk-uploads="true"
label-idle="Drop files here..." label-idle="Drop files here..."
@ -53,6 +53,17 @@
@processfile="handleFilePondProcessfile" @processfile="handleFilePondProcessfile"
@removefile="handleFilePondRemovefile" @removefile="handleFilePondRemovefile"
/> />
<file-pond
v-if="selected && acceptedFileTypes === '*'"
ref="pond"
chunk-uploads="true"
label-idle="Drop files here..."
:allow-multiple="true"
:server="server"
:files="myFiles"
@processfile="handleFilePondProcessfile"
@removefile="handleFilePondRemovefile"
/>
<v-data-table <v-data-table
v-if="errors.length > 0" v-if="errors.length > 0"
:headers="headers" :headers="headers"

Loading…
Cancel
Save