fix media upload without name, add data result to uploaded payload

This commit is contained in:
dswbx
2025-02-21 07:40:43 +01:00
parent eaa7276173
commit cfa950aa46
6 changed files with 30 additions and 19 deletions

View File

@@ -44,7 +44,8 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
return (await res.blob()) as File;
}
getFileUploadUrl(file: FileWithPath): string {
getFileUploadUrl(file?: FileWithPath): string {
if (!file) return this.getUrl("/upload");
return this.getUrl(`/upload/${file.path}`);
}