reshape zip content structure
This commit is contained in:
parent
e26f4eecc5
commit
11ad41aae4
@ -93,13 +93,13 @@ export default class OfficeFoldersController extends ApiController {
|
|||||||
(async () => {
|
(async () => {
|
||||||
const data = await this.filesService.download(uid);
|
const data = await this.filesService.download(uid);
|
||||||
if (!data?.buffer) return;
|
if (!data?.buffer) return;
|
||||||
zip.addFile(`${uid}-${data.file.file_name}`, data.buffer);
|
zip.addFile(`Documents du client/${uid}-${data.file.file_name}`, data.buffer);
|
||||||
})()
|
})()
|
||||||
|
|
||||||
const uids: string[] = folderFilesUid.filter((uid): uid is string => uid !== undefined);
|
const uids: string[] = folderFilesUid.filter((uid): uid is string => uid !== undefined);
|
||||||
|
|
||||||
const zip = new Zip();
|
const zip = new Zip();
|
||||||
zip.addFile(`${uid}-certificat-de-dépôt.pdf`, anchoringProof);
|
zip.addFile("Certificat de dépôt du dossier.pdf", anchoringProof);
|
||||||
await Promise.allSettled(
|
await Promise.allSettled(
|
||||||
uids.map(addFileToZip(zip))
|
uids.map(addFileToZip(zip))
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user