feat(medusa-file-local): implement missing streaming methods (#4788)

This commit is contained in:
Frane Polić
2023-08-23 13:05:04 +02:00
committed by GitHub
parent 4843cc6301
commit d8a6e3e0d8
10 changed files with 189 additions and 107 deletions
+32
View File
@@ -0,0 +1,32 @@
import stream from "stream"
export type FileServiceUploadResult = {
url: string
key: string
}
export type FileServiceGetUploadStreamResult = {
writeStream: stream.PassThrough
promise: Promise<any>
url: string
fileKey: string
[x: string]: unknown
}
export type GetUploadedFileType = {
fileKey: string
isPrivate?: boolean
[x: string]: unknown
}
export type DeleteFileType = {
fileKey: string
[x: string]: unknown
}
export type UploadStreamDescriptorType = {
name: string
ext?: string
isPrivate?: boolean
[x: string]: unknown
}
+1
View File
@@ -6,6 +6,7 @@ export * from "./common"
export * from "./dal"
export * from "./event-bus"
export * from "./feature-flag"
export * from "./file-service"
export * from "./inventory"
export * from "./joiner"
export * from "./logger"