adds waypoint images

This commit is contained in:
Christian Beutel
2024-03-20 20:46:29 +01:00
parent 3e8fb85c05
commit e5b5e50747
26 changed files with 1064 additions and 221 deletions

View File

@@ -5,4 +5,15 @@ export function getFileURL(record: { [key: string]: any; }, filename?: string) {
}
return `/api/v1/files/${record.collectionId}/${record.id}/${filename}`
}
}
export function readAsDataURLAsync(file: File) {
return new Promise<string>((resolve, reject) => {
var fr = new FileReader();
fr.onload = () => {
resolve(fr.result as string);
};
fr.onerror = reject;
fr.readAsDataURL(file);
});
}