aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSubView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-26 20:48:51 -0500
committerbobzel <zzzman@gmail.com>2025-02-26 20:48:51 -0500
commita9a1a6a507616a77f70d6525dab5027f5b7a60e6 (patch)
tree97a37fdcdfed7bb2f0635b88b543ad525b58de14 /src/client/views/collections/CollectionSubView.tsx
parentfa8122df7467af3d4410b7daf1cd75227a53fd96 (diff)
added typing to PostToServer calls. made smartDraw popup create images locally.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index b40cd2761..ca830aa6f 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -28,6 +28,7 @@ import { FieldViewProps } from '../nodes/FieldView';
import { DocumentView, DocumentViewProps } from '../nodes/DocumentView';
import { FlashcardPracticeUI } from './FlashcardPracticeUI';
import { OpenWhere, OpenWhereMod } from '../nodes/OpenWhere';
+import { Upload } from '../../../server/SharedMediaTypes';
export enum docSortings {
Time = 'time',
@@ -407,7 +408,7 @@ export function CollectionSubView<X>() {
const imgSrc = img.split('src="')[1].split('"')[0];
const imgOpts = { ...options, _width: 300 };
if (imgSrc.startsWith('data:image') && imgSrc.includes('base64')) {
- const result = (await Networking.PostToServer('/uploadRemoteImage', { sources: [imgSrc] })).lastElement();
+ const result = ((await Networking.PostToServer('/uploadRemoteImage', { sources: [imgSrc] })) as Upload.ImageInformation[]).lastElement();
const newImgSrc =
result.accessPaths.agnostic.client.indexOf('dashblobstore') === -1 //
? ClientUtils.prepend(result.accessPaths.agnostic.client)