2

I want to create an archive/zip file with APEX, my requirement is to extract all the documents related to an account and archive it as a zip file. Files could be images, text word or CVS etc.

I still doubt whether this is possible in APEX, However I'm asking this question to collect some facts.

Pleases provide some info if this is possible otherwise want to know why this is not possible in APEX?

I tried to use the this library, but this gives me a CPU Limit exceeded error when I try to compress multiple files at once.

and I found that there are several people suggesting to do this task in client side, but in my case I have to do this in server side, such as using a scheduler

  • 3
    You're almost certain to hit CPU/Heap limits if you try to implement this feature natively. – Adrian Larson Mar 6 '17 at 22:13
  • 2
    Generally speaking, Apex doesn't really have any support for working with Zip compression. They've done some cleaver things in Zippex. As you found, it is likely to blow out with larger files due to all the extra hopes that need to be jumped through to make it work. – Daniel Ballinger Mar 6 '17 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.