aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LoadingBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r--src/client/views/nodes/LoadingBox.tsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx
index 0e0619241..9d4668dde 100644
--- a/src/client/views/nodes/LoadingBox.tsx
+++ b/src/client/views/nodes/LoadingBox.tsx
@@ -4,6 +4,7 @@ import { FieldView, FieldViewProps } from './FieldView';
import * as React from 'react';
import './LoadingBox.scss';
import ReactLoading from 'react-loading';
+import { Docs, DocUtils } from '../../documents/Documents';
export interface LoadingBoxProps {
title: string;
@@ -16,6 +17,30 @@ export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
return FieldView.LayoutString(LoadingBox, fieldKey);
}
+ componentDidMount() {
+ // const file = Docs.Create.filesToDocs.get(this.rootDoc);
+ // if (file) {
+ // console.log('Got to file');
+ // Docs.Create.filesToDocs.delete(this.rootDoc);
+ // // now that there is a doc do whatever slowload was going to do with that file
+ // if (typeof file === 'string') {
+ // // uploadYoutubeVideo and similar should return a placeholder, one for each placeholder
+ // // (await DocUtils.uploadYoutubeVideo(files, options)));
+ // } else {
+ // // uploadFilesToDocs and similar should return a placeholder, one for each placeholder
+ // DocUtils.uploadFileToDoc(file, {}, this.rootDoc);
+ // }
+ // } else {
+ // // check if file now exists on server or not
+ // // if it does we need to retreieve it and create the appropriate doc (rest of what uploadFileToDoc was doing minus uploading)
+ // // if it doesn't display an error message "upload failed"
+ // }
+ // query endpoints to:
+ // check if file now exists on server or not
+ // if it does we need to retreieve it and create the appropriate doc (rest of what uploadFileToDoc was doing minus uploading)
+ // if it doesn't display an error message "upload failed"
+ }
+
constructor(props: any) {
super(props);
}