feat(medusa-file-local): implement missing streaming methods (#4788)
This commit is contained in:
1 parent
4843cc6301
commit
d8a6e3e0d8
10 files changed
+189
-107
No files matched your search
@@ -1,35 +1,11 @@
|
||||
import stream from "stream"
|
||||
import { TransactionBaseService } from "./transaction-base-service"
|
||||
|
||||
export type FileServiceUploadResult = {
|
||||
url: 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
|
||||
}
|
||||
import {
|
||||
DeleteFileType,
|
||||
FileServiceGetUploadStreamResult,
|
||||
FileServiceUploadResult,
|
||||
GetUploadedFileType,
|
||||
UploadStreamDescriptorType,
|
||||
} from "@medusajs/types"
|
||||
|
||||
export interface IFileService extends TransactionBaseService {
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user