refactor: update type handling in SvelteKit adapter tests and MediaApi uploadFile method

This commit is contained in:
dswbx
2026-01-09 14:51:42 +01:00
parent 4a5bdade8d
commit 0e4f25cf11
2 changed files with 5 additions and 4 deletions

View File

@@ -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(