Revamp calendar dialog (#158)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -54,3 +54,11 @@ export function isValidUrl(string?: string) {
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
export async function importFile(file: File) {
|
||||
const response = await api.post(
|
||||
`api/files?mimetype=${file.type}&name=${file.name}&size=${file.size}`,
|
||||
{ body: await file.text() }
|
||||
);
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user