Skip to main content
15-Moonstone
March 17, 2022
Solved

Compression for file downloads

  • March 17, 2022
  • 1 reply
  • 1529 views

Hello,

I am creating a csv file in the file repository for a historical data which is more than 100K rows and to be downloaded by the end user. 

1. Is there a way where I can apply a compression on the file to be downloaded.

2. If 1 approach where i am creating a file and getting the link from "GetFileListingWithLinks" of the file repository is not correct , what would be the better approach to achieve the file download.

 

Thanks,

Sunay

Best answer by slangley

Hi @sbt.

 

There is a CreateZipArchive service you can use for compression.  GetFileListingWithLinks is an appropriate choice but depending on your needs there are other services available as well.

 

Regards.

 

--Sharon

 

1 reply

slangleyCommunity ManagerAnswer
Support
March 18, 2022

Hi @sbt.

 

There is a CreateZipArchive service you can use for compression.  GetFileListingWithLinks is an appropriate choice but depending on your needs there are other services available as well.

 

Regards.

 

--Sharon

 

sbt15-MoonstoneAuthor
15-Moonstone
March 18, 2022

Thanks for your reply.

So you want me to create a zip file and then create a link from the GetFileListingWithLinks service for the zip file and allow the user to download?.

When you say other service , what service can help in my case where i need to allow the user to download a large file size ~20-25mb.

 

Thanks,

Sunay

Rocko
19-Tanzanite
August 25, 2022

One way is to create a zip in the repository and return the link to the zip file.

Another thought is to enable Tomcat compression for this file type. This way, it will be compressed on the fly in the transfer. This might be slightly worse compression, but the least effort.