Refactor Picture upload

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-20 18:34:13 +01:00
parent 7a731f1ef8
commit 605239130e
8 changed files with 70 additions and 39 deletions

View File

@@ -9,7 +9,7 @@ export async function buildFileFromIPicture(obj: IPicture | null | undefined): P
return new File([blob], obj.name);
}
export function buildFileVariable<T>(file: File | null, name: string, alt?: string): Record<string, unknown> {
export function buildFileVariable(file: File | null, name: string, alt?: string): Record<string, unknown> {
if (!file) return {};
return {