adds waypoint images
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user