mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
refactor: update type handling in SvelteKit adapter tests and MediaApi uploadFile method
This commit is contained in:
@@ -71,7 +71,7 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
|
||||
}
|
||||
|
||||
protected uploadFile<T extends FileUploadedEventData>(
|
||||
body: File | Blob | ReadableStream | Buffer<ArrayBufferLike>,
|
||||
body: BodyInit,
|
||||
opts?: {
|
||||
filename?: string;
|
||||
path?: TInput;
|
||||
@@ -154,7 +154,7 @@ export class MediaApi extends ModuleApi<MediaApiOptions> {
|
||||
});
|
||||
}
|
||||
|
||||
return this.uploadFile<T>(item, opts);
|
||||
return this.uploadFile<T>(item as BodyInit, opts);
|
||||
}
|
||||
|
||||
async uploadToEntity(
|
||||
|
||||
Reference in New Issue
Block a user