fix: Fixed issue where non-image inlined files would not correctly be imported from a Markdown file
This commit is contained in:
@@ -21,6 +21,7 @@ export type ImportModalFile = (
|
||||
| { status: 'ready'; payloads?: DecryptedTransferPayload[] }
|
||||
| { status: 'parsing' }
|
||||
| { status: 'importing' }
|
||||
| { status: 'uploading-files' }
|
||||
| { status: 'success'; successMessage: string }
|
||||
| { status: 'error'; error: Error }
|
||||
) &
|
||||
@@ -105,7 +106,14 @@ export class ImportModalController {
|
||||
})
|
||||
|
||||
try {
|
||||
await this.importer.importFromTransferPayloads(payloads)
|
||||
const insertedItems = await this.importer.importFromTransferPayloads(payloads)
|
||||
|
||||
this.updateFile({
|
||||
...file,
|
||||
status: 'uploading-files',
|
||||
})
|
||||
|
||||
await this.importer.uploadAndReplaceInlineFilesInInsertedItems(insertedItems)
|
||||
|
||||
const notesImported = payloads.filter((payload) => payload.content_type === ContentType.TYPES.Note)
|
||||
const tagsImported = payloads.filter((payload) => payload.content_type === ContentType.TYPES.Tag)
|
||||
|
||||
@@ -103,6 +103,7 @@ const ImportModalFileItem = ({
|
||||
{file.status === 'pending' && 'Could not auto-detect service. Please select manually.'}
|
||||
{file.status === 'parsing' && 'Parsing...'}
|
||||
{file.status === 'importing' && 'Importing...'}
|
||||
{file.status === 'uploading-files' && 'Uploading and embedding files...'}
|
||||
{file.status === 'error' && JSON.stringify(file.error)}
|
||||
{file.status === 'success' && file.successMessage}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user