Chore: rework image uploading, should work better now

This commit is contained in:
Pieter Vander Vennet 2023-09-25 02:13:24 +02:00
parent 6f5b0622a5
commit 94ba18785d
17 changed files with 548 additions and 238 deletions

View file

@ -0,0 +1,15 @@
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
* @param title
* @param description
* @param blob
*/
uploadImage(
title: string,
description: string,
blob: File
): Promise<{ key: string, value: string }>;
}