What is mime type of binary data output of zip extension?

Hi all,

Following this post https://www.outsystems.com/forums/discussion/21345/how-to-use-zip-extension/,

I have already used download widget at the end of flow but I don't know what data to pass in Mime-Type of download widget. I tried "application/zip" and it pop up this error "An exception occurred in the client script. Error: The connection to the server was reset", log error in servercenter is "Error invalidating cache. Check the Cache Invalidation Service status in the Environment Health page."

Thank you,

Huy

Hello Huy. That mime-type is correct: "application/zip".

The error you're getting is due to a bug in the latest personal environment version. I recommend you to open a support case, and they will patch your personal environment.

leonardo.fernandes wrote:

Hello Huy. That mime-type is correct: "application/zip".

The error you're getting is due to a bug in the latest personal environment version. I recommend you to open a support case, and they will patch your personal environment.

Hi leonardo.fernandes,

Beside open a support case, can you suggest me some another ways to download many file into zip file?

Can I use component related to download zip file on forge instead of using ZIP extension? 



I'm pretty sure you're using the right tool to download the zip file. I'm not sure why it's causing that particular error, though. Can you share the code? At least a screenshot of it?

leonardo.fernandes wrote:

I'm pretty sure you're using the right tool to download the zip file. I'm not sure why it's causing that particular error, though. Can you share the code? At least a screenshot of it?

I loop through list record with checkbox to check whether current checkbox has checked or not; If it was checked, I will get binary data content then use addfile function to add that binary data.

When I debug flow, error happen when pointer reach download widget.


Solution

Your code looks fine, and I suspect that the error you pasted ("Error invalidating cache") has nothing to do with it.

It may be that this action is invoked by an Ajax link/button. If that is the case, it would explain your download failing. Just change the button to Submit and it should work.

Solution

leonardo.fernandes wrote:

Your code looks fine, and I suspect that the error you pasted ("Error invalidating cache") has nothing to do with it.

It may be that this action is invoked by an Ajax link/button. If that is the case, it would explain your download failing. Just change the button to Submit and it should work.


Hi leonardo.fernandes,

Thank you. After I changed to submit method, it downloaded successfully.

I wonder why download fail when method of button/link is Ajax submit?