'cannot open the file as zip archive is not archive' in CAF UI

Hi All,
I am facing the following error while trying to download zip file from CAF UI ‘cannot open the file as zip archive is not archive’

and i did pass these below arguments for SimpleFileExportBean

SimpleFileExportBean ff = new SimpleFileExportBean(“cimUpload.zip”, “Application/Zip”, File.getBytes().length, true, File.getBytes());

Can someone kindly help me with this error

Hi Manju,

The bytes you are reading from File is not of content-type Application/zip, I guess that’s why that error is coming.

First you need to zip the content probably and then export it using content-type Application/zip

Else, try to use content-type as - application/ octet-stream in the SimpleFileExportBean and see if that works. But not sure after the zip file exported with this looks like.

Regards,
Firoz Nalband.