cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Compression for file downloads

sbt
15-Moonstone
15-Moonstone

Compression for file downloads

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

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:sbt)

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

 

View solution in original post

4 REPLIES 4
slangley
23-Emerald II
(To:sbt)

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

 

sbt
15-Moonstone
15-Moonstone
(To:slangley)

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
18-Opal
(To:sbt)

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.

slangley
23-Emerald II
(To:slangley)

Hi @sbt.

 

Based on the use case you described, this is a viable option. What are your concerns?  Are you running into issues?

 

Regards.

 

--Sharon

 

Announcements


Top Tags