feat: Add support for private files to file module (#8169)

This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-07-18 09:46:10 +02:00
1 parent 76173afdfc
commit c58a35f0c0
11 files changed
+98 -63

No files matched your search

@@ -7,6 +7,7 @@ type UploadFilesStepInput = {
filename: string
mimeType: string
content: string
access: "public" | "private"
}[]
}
@@ -7,6 +7,7 @@ type WorkflowInput = {
filename: string
mimeType: string
content: string
access: "public" | "private"
}[]
}
@@ -16,4 +16,9 @@ export interface CreateFileDTO {
* The file content as a binary-encoded string
*/
content: string
/**
* The access level of the file. Defaults to private if not passed
*/
access?: "public" | "private"
}
+6 -4
View File
@@ -24,10 +24,6 @@ export type ProviderGetFileDTO = {
* The file's key.
*/
fileKey: string
/**
* Whether the file is private.
*/
isPrivate?: boolean
[x: string]: unknown
}
@@ -65,6 +61,11 @@ export type ProviderUploadFileDTO = {
* The file content as a binary-encoded string
*/
content: string
/**
* The access level of the file. Defaults to private if not passed
*/
access?: "public" | "private"
}
export interface IFileProvider {
@@ -85,6 +86,7 @@ export interface IFileProvider {
*
*/
delete(fileData: ProviderDeleteFileDTO): Promise<void>
/**
* This method is used to retrieve a download URL of the file. For some file services, such as S3, a presigned URL indicates a temporary URL to get access to a file.
*
@@ -1,4 +1,5 @@
export interface LocalFileServiceOptions {
upload_dir?: string
private_upload_dir?: string
backend_url?: string
}