mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
import notes from tar archive, closes #63
This commit is contained in:
@@ -6,6 +6,26 @@ function exportSubTree(noteId) {
|
||||
download(url);
|
||||
}
|
||||
|
||||
function importSubTree(noteId) {
|
||||
let importNoteId;
|
||||
|
||||
}
|
||||
function importSubTree(noteId) {
|
||||
importNoteId = noteId;
|
||||
|
||||
$("#import-upload").trigger('click');
|
||||
}
|
||||
|
||||
$("#import-upload").change(async function() {
|
||||
const formData = new FormData();
|
||||
formData.append('upload', this.files[0]);
|
||||
|
||||
await $.ajax({
|
||||
url: baseApiUrl + 'import/' + importNoteId,
|
||||
headers: server.getHeaders(),
|
||||
data: formData,
|
||||
type: 'POST',
|
||||
contentType: false, // NEEDED, DON'T OMIT THIS
|
||||
processData: false, // NEEDED, DON'T OMIT THIS
|
||||
});
|
||||
|
||||
await noteTree.reload();
|
||||
});
|
||||
Reference in New Issue
Block a user