Hook up API
This commit is contained in:
@@ -497,6 +497,15 @@ export default class DocumentsStore extends BaseStore<Document> {
|
||||
return this.add(res.data);
|
||||
};
|
||||
|
||||
@action
|
||||
batchImport = async (file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append("type", "outline");
|
||||
formData.append("file", file);
|
||||
|
||||
await client.post("/documents.batchImport", formData);
|
||||
};
|
||||
|
||||
@action
|
||||
import = async (
|
||||
file: File,
|
||||
|
||||
Reference in New Issue
Block a user