20260719215738
This commit is contained in:
1 parent
35aa108a34
commit
cda7f16d3a
116 files changed
+11826
-3669
No files matched your search
@@ -84,6 +84,7 @@ export function saveDataApi(params: SaveDataParams[]) {
|
||||
interface S3UploadOptions {
|
||||
familyId?: number;
|
||||
uploadType?: "avatar";
|
||||
module?: "finance" | "clothing" | "meal" | "chat" | "todo" | "anniversary";
|
||||
}
|
||||
|
||||
export function s3UploadFileApi(files: any[], options: number | S3UploadOptions) {
|
||||
@@ -98,6 +99,10 @@ export function s3UploadFileApi(files: any[], options: number | S3UploadOptions)
|
||||
form.append("upload_type", uploadOptions.uploadType);
|
||||
}
|
||||
|
||||
if (uploadOptions.module) {
|
||||
form.append("upload_module", uploadOptions.module);
|
||||
}
|
||||
|
||||
files.forEach((file) => {
|
||||
form.append("files", file as any);
|
||||
});
|
||||
@@ -109,9 +114,12 @@ export function s3UploadFileApi(files: any[], options: number | S3UploadOptions)
|
||||
});
|
||||
}
|
||||
|
||||
export function s3CopyFilesApi(familyId: number, keys: string[]) {
|
||||
type S3Module = "finance" | "clothing" | "meal" | "chat" | "todo" | "anniversary";
|
||||
|
||||
export function s3CopyFilesApi(familyId: number, keys: string[], module: S3Module) {
|
||||
return alovaInstance.Post<ResponseData<string[]>>("/s3/copy", {
|
||||
family_id: familyId,
|
||||
module,
|
||||
keys,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user