mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 06:54:44 +08:00
fix upload of the same file in succession, #388
This commit is contained in:
parent
d8b78d8025
commit
8b250ed523
2 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,10 @@ $("#import-upload").change(async function() {
|
|||
const formData = new FormData();
|
||||
formData.append('upload', this.files[0]);
|
||||
|
||||
// this is done to reset the field otherwise triggering import same file again would not work
|
||||
// https://github.com/zadam/trilium/issues/388
|
||||
$("#import-upload").val('');
|
||||
|
||||
await $.ajax({
|
||||
url: baseApiUrl + 'notes/' + importNoteId + '/import',
|
||||
headers: server.getHeaders(),
|
||||
|
|
|
@ -10,6 +10,10 @@ $("#file-upload").change(async function() {
|
|||
const formData = new FormData();
|
||||
formData.append('upload', this.files[0]);
|
||||
|
||||
// this is done to reset the field otherwise triggering import same file again would not work
|
||||
// https://github.com/zadam/trilium/issues/388
|
||||
$("#file-upload").val('');
|
||||
|
||||
const resp = await $.ajax({
|
||||
url: baseApiUrl + 'notes/' + noteDetailService.getCurrentNoteId() + '/upload',
|
||||
headers: server.getHeaders(),
|
||||
|
|
Loading…
Reference in a new issue