mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix media upload without name, add data result to uploaded payload
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user