fix(core): update

This commit is contained in:
2024-06-09 16:02:33 +02:00
parent 559e3da47b
commit 591c99736d
4 changed files with 25 additions and 6 deletions

View File

@@ -33,6 +33,10 @@ export class File {
fileName: optionsArg.name,
});
if (contents instanceof plugins.stream.Readable) {
await optionsArg.directory.fastPutStream({
path: optionsArg.name,
stream: contents,
});
} else {
await optionsArg.directory.fastPut({
path: optionsArg.name,
@@ -160,7 +164,7 @@ export class File {
) {
await this.parentDirectoryRef.bucketRef.fastPutStream({
path: this.getBasePath(),
dataStream: optionsArg.contents,
readableStream: optionsArg.contents,
});
} else if (Buffer.isBuffer(optionsArg.contents)) {
await this.parentDirectoryRef.bucketRef.fastPut({