Wrong local header signature

Good day.


In the image below I am trying to create a zip file. Their are two things happening here. One i am adding PDF file to the zip and the second is I am extracting files from another zip and then adding them to the current zip. So basically I'm trying to add both PDF files and files from within other zip files to a zip file and then download it. The problem is I am currently getting a Wrong Local header signature: 0x46445025 error which in the following post   https://www.outsystems.com/forums/discussion/40720/wrong-local-header-signature/#Post146413 says that the file is corrupt. My issue is when i download the files separately it works so why won't it work when i try to zip it? Is my code wrong or do I need to add an extension? Apologies if it does not make sense and thank you for any help.

Kind regards 


Hi David, 

I am not sure if I can assist, but perhaps you could attach the application to allow others to assist you quicker? 

Just attach the .oap to this forum. 

Thanks, 

Nick

Hi David,

Are you getting this error on publishing or on runtime? if its in runtime, check it encoding of your downloaded binary.


Thanks,

Balasubramanian

Solution

Good day


So the problem ending up being that the local variable I was using to store the file name was not being cleared. This casused the pdf documents in the list to go through the zip extractor that then casused the error.


Thank you for Balu Prakasam and Nicholas van Wyngaard for your help I still really appreciate it

Solution

Hi David,

Thanks for letting us know the solution. Indeed, the "Wrong Local header signature" almost always means you try to unzip a file that isn't a ZIP file, as in your case.