2025-05-07 16:31:00 +02:00
|
|
|
import { UIEventSource } from "../UIEventSource"
|
|
|
|
|
2023-09-25 02:13:24 +02:00
|
|
|
export interface ImageUploader {
|
2023-09-28 23:50:27 +02:00
|
|
|
maxFileSizeInMegabytes?: number
|
2023-09-25 02:13:24 +02:00
|
|
|
/**
|
|
|
|
* Uploads the 'blob' as image, with some metadata.
|
|
|
|
* Returns the URL to be linked + the appropriate key to add this to OSM
|
|
|
|
*/
|
|
|
|
uploadImage(
|
2024-09-26 19:15:20 +02:00
|
|
|
blob: File,
|
2024-10-19 14:44:55 +02:00
|
|
|
currentGps: [number, number],
|
2024-10-12 13:36:10 +02:00
|
|
|
author: string,
|
2025-05-07 16:31:00 +02:00
|
|
|
noblur: boolean,
|
|
|
|
progress?: UIEventSource<number>
|
2024-09-28 02:44:03 +02:00
|
|
|
): Promise<UploadResult>
|
2023-09-25 02:13:24 +02:00
|
|
|
}
|
2024-09-28 02:44:03 +02:00
|
|
|
|
2024-10-19 14:44:55 +02:00
|
|
|
export interface UploadResult {
|
|
|
|
key: string
|
|
|
|
value: string
|
|
|
|
absoluteUrl: string
|
|
|
|
}
|