Restores file import on sidebar menu

This commit is contained in:
Tom Moor
2018-01-29 23:04:45 -08:00
parent ba72ecb0e3
commit 29aba6bfe6
3 changed files with 27 additions and 15 deletions

View File

@ -54,11 +54,19 @@ class DropToImport extends Component {
}
for (const file of files) {
await importFile({ file, documentId, collectionId, redirect }, doc => {
if (redirect) {
this.props.history.push(doc.url);
importFile(
{
documents: this.props.documents,
file,
documentId,
collectionId,
},
doc => {
if (redirect) {
this.props.history.push(doc.url);
}
}
});
);
}
} catch (err) {
// TODO: show error alert.