MapComplete/src/Logic/ImageProviders/ImageUploader.ts

22 lines
557 B
TypeScript

import { UIEventSource } from "../UIEventSource"
export interface ImageUploader {
maxFileSizeInMegabytes?: number
/**
* Uploads the 'blob' as image, with some metadata.
* Returns the URL to be linked + the appropriate key to add this to OSM
*/
uploadImage(
blob: File,
currentGps: [number, number],
author: string,
noblur: boolean,
progress?: UIEventSource<number>
): Promise<UploadResult>
}
export interface UploadResult {
key: string
value: string
absoluteUrl: string
}