aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/ImageUpload.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-18 22:01:02 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-06-18 22:01:02 -0700
commita19d891f386816f127ea1ee3970c6ec48adb0d74 (patch)
tree5881f9a4c1858739159b098d17ff41f1ed6a167a /src/mobile/ImageUpload.tsx
parent738a56b3c18c06d8290346373eb60a125120caaf (diff)
added mobile collection to menu and added image upload to current collection
Diffstat (limited to 'src/mobile/ImageUpload.tsx')
-rw-r--r--src/mobile/ImageUpload.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mobile/ImageUpload.tsx b/src/mobile/ImageUpload.tsx
index b66f0461d..0b63c42be 100644
--- a/src/mobile/ImageUpload.tsx
+++ b/src/mobile/ImageUpload.tsx
@@ -29,7 +29,7 @@ export interface ImageUploadProps {
const inputRef = React.createRef<HTMLInputElement>();
@observer
-export class Uploader extends React.Component {
+export class Uploader extends React.Component<ImageUploadProps> {
@observable error: string = "";
@observable status: string = "";
@observable nm: string = "Choose files";
@@ -37,6 +37,7 @@ export class Uploader extends React.Component {
onClick = async () => {
try {
+ const col = this.props.Document;
await Docs.Prototypes.initialize();
const imgPrev = document.getElementById("img_preview");
const slab1 = document.getElementById("slab1");
@@ -84,7 +85,11 @@ export class Uploader extends React.Component {
const field = await DocServer.GetRefField(res);
let pending: Opt<Doc>;
if (field instanceof Doc) {
- pending = await Cast(field.rightSidebarCollection, Doc);
+ // if (col === Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc) {
+ // pending = await Cast(field.rightSidebarCollection, Doc);
+ // }
+ pending = col;
+ //pending = await Cast(field.col, Doc);
}
if (pending) {
const data = await Cast(pending.data, listSpec(Doc));