im new to programming and i have this app that takes input from the user in a form and generates a pdf to download.
However the issue im experimenting is if 2 or more users do the process at the same time the download file for all users becomes the last file generated.
Thank you very much in advanced for helping.
var zip = new AdmZip();
var fs=require('fs-extra');
let arr = ['./Facturas/' + pdfFileName + '/' + pdfFileName + '.pdf', './Facturas/' + pdfFileName + '/' + xmlFileName + '.xml']
for(let i = 0 ;i<arr.length ;i++){
zip.addLocalFile(`./${arr[i]}`); //local path
}
zip.writeZip('./Facturas/' + pdfFileName + '.zip');
var file = '../Facturas/' + putopdf + '.zip';
res.sendFile(file); // Set disposition and send