aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-02-12 13:13:07 -0500
committerbob <bcz@cs.brown.edu>2020-02-12 13:13:07 -0500
commit1ae7bb0792c233d8379e1949f965c864667cf3ae (patch)
tree097b78c89d420dfa6ad2d96bcb0dc7e2ea83da0d
parent01849d93adacc681835318b70e86e6d7f046c6aa (diff)
fixed upload of videos.
-rw-r--r--src/client/views/collections/CollectionSubView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index 32480ad4e..acab45078 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -315,9 +315,9 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) {
const dropFileName = file ? file.name : "-empty-";
promises.push(Networking.PostFormDataToServer("/uploadFormData", formData).then(results => {
results.map(action((result: any) => {
- const { accessPaths, nativeWidth, nativeHeight, contentSize } = result;
+ const { agnostic, accessPaths, nativeWidth, nativeHeight, contentSize } = result;
const full = { ...options, _width: 300, title: dropFileName };
- const pathname = Utils.prepend(accessPaths.agnostic.client);
+ const pathname = Utils.prepend(accessPaths?.agnostic.client || agnostic.client);
Docs.Get.DocumentFromType(type, pathname, full).then(doc => {
if (doc) {
const proto = Doc.GetProto(doc);