Ashish
Ashish

Reputation: 21

Some files missing in zip archive

I am adding pdf files created by wkhtmptopdf to archiver.My purpose is to create a zip file of all the pdf's.I am posting the zip to s3 bucket. BUt in the bucket some files are missing in the zip file. Randomly out of all files some files are empty in the zip.

for (var i = 1; i <= dataCount; i++) {

    var output_filename = 'testing' +'_'+i+'.pdf';

        const html = "sdfsdfsdf";

    var obg= wkhtmltopdf(html, wkhtmltopdfOptions); 


     var results = [];


     archive.append(obg, { name: output_filename });
 } // closing the for loop
    archive.finalize();

Upvotes: 2

Views: 368

Answers (0)

Related Questions