diff options
author | bobzel <zzzman@gmail.com> | 2020-10-22 13:30:01 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-22 13:30:01 -0400 |
commit | 040d65234f52dc3337483acdb2c1c6d0cc8fefa2 (patch) | |
tree | 182ee96f2bbb286959f519fcbcd18895ce33b938 /src | |
parent | f9c692dee1a1cf0152625e97d3a1c7f272767d25 (diff) |
added alert for uknown filetype uploads
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 3 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 38bfe3fb6..07447b93c 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1124,6 +1124,9 @@ export class CurrentUserUtils { const disposer = OverlayView.ShowSpinner(); DocListCastAsync(importDocs.data).then(async list => { const results = await DocUtils.uploadFilesToDocs(Array.from(input.files || []), {}); + if (results.length !== input.files?.length) { + alert("Error uploading files - possibly due to unsupported file types") + } list?.splice(0, 0, ...results); disposer(); }); diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index 5c3c70be2..0dd033e47 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -482,6 +482,8 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?: } else { if (text && !text.includes("https://")) { UndoManager.RunInBatch(() => this.addDocument(Docs.Create.TextDocument(text, { ...options, title: text.substring(0, 20), _width: 400, _height: 315 })), "drop"); + } else { + alert("Document updloaded failed - possibly an unsupported file type.") } } disposer(); |