Skip to content
Advertisement

how to zipping multiple files and encode to base64?

I have made a few lines of code and worked for a while, the program I created is like this. When I compress the .zip format, an example.zip file will be formed in the directory. The next step the program runs the command to look for the .zip filename in the directory. If found it will be converted into base64 and sent as a response body.

My question is, how do I process the .zip format? This program does not form files in the directory, but immediately converts to the base64 stage, so there is no need for an example.zip file in the directory.

JavaScript

FileConvert.class

JavaScript

Advertisement

Answer

Controller class :

JavaScript

FileConvert class :

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement