diff options
author | Eleanor Eng <eleanor.eng5@gmail.com> | 2019-11-16 16:37:36 -0500 |
---|---|---|
committer | Eleanor Eng <eleanor.eng5@gmail.com> | 2019-11-16 16:37:36 -0500 |
commit | b5111d4f4c44b845b7dd324e4332bcdc12eda0b8 (patch) | |
tree | 3c8ecc0af2accd5a49d6ff3ba1e46e7dab82858d /src/client/util/Import & Export/ImageUtils.ts | |
parent | c24c16efbf798eac1003811f6c0ed98bfc65f48e (diff) | |
parent | ab285371f6fb2a4f1e64888bafbc84b602f23416 (diff) |
merge
Diffstat (limited to 'src/client/util/Import & Export/ImageUtils.ts')
-rw-r--r-- | src/client/util/Import & Export/ImageUtils.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/util/Import & Export/ImageUtils.ts b/src/client/util/Import & Export/ImageUtils.ts index c9abf38fa..ca80f3bca 100644 --- a/src/client/util/Import & Export/ImageUtils.ts +++ b/src/client/util/Import & Export/ImageUtils.ts @@ -1,9 +1,8 @@ -import { Doc, DocListCast, DocListCastAsync, Opt } from "../../../new_fields/Doc"; +import { Doc } from "../../../new_fields/Doc"; import { ImageField } from "../../../new_fields/URLField"; import { Cast, StrCast } from "../../../new_fields/Types"; -import { RouteStore } from "../../../server/RouteStore"; import { Docs } from "../../documents/Documents"; -import { Identified } from "../../Network"; +import { Networking } from "../../Network"; import { Id } from "../../../new_fields/FieldSymbols"; import { Utils } from "../../../Utils"; @@ -15,7 +14,7 @@ export namespace ImageUtils { return false; } const source = field.url.href; - const response = await Identified.PostToServer(RouteStore.inspectImage, { source }); + const response = await Networking.PostToServer("/inspectImage", { source }); const { error, data } = response.exifData; document.exif = error || Docs.Get.DocumentHierarchyFromJson(data); return data !== undefined; @@ -23,7 +22,7 @@ export namespace ImageUtils { export const ExportHierarchyToFileSystem = async (collection: Doc): Promise<void> => { const a = document.createElement("a"); - a.href = Utils.prepend(`${RouteStore.imageHierarchyExport}/${collection[Id]}`); + a.href = Utils.prepend(`imageHierarchyExport/${collection[Id]}`); a.download = `Dash Export [${StrCast(collection.title)}].zip`; a.click(); }; |