File name based on Content-Encoding

Hi,

I have a Web API server on C# that sends PDFs to our Web Viewer.
This is my first Web API app.
I implemented compression on the Web API server, but we still get this warning:
There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See Content-encoding | Apryse Documentation for instructions on how to resolve this.

I looked at the guide and I’m confused about this:
The goal is to serve files within WebViewer containing “.gz.” in their file name with “Content-Encoding: gzip” and files containing “.br.” in their file name with “Content-Encoding: br”.

My question is. Do I have to modify the file names the Web API is sending to out Web Viewer?

The issue is from the log I see the compression is decided after the controller sends the file:
2024-08-26 12:46:47.576 +00:00 [INF] Executing FileContentResult, sending file with download name ‘1_1972019_728413.pdf’ …
2024-08-26 12:46:47.576 +00:00 [DBG] The response will be compressed with ‘br’.

Any advice how I should solve this issue.

Thank you.

Also, here is more info about the WebViewer we use. You can see there are 2 warning even the file is received 1 time:

Hello,

Thank you for contacting WebViewer Forums.

To get rid of the warning, your server needs to be configured to serve these pre-compressed .gz and .br files with the correct Content-Encoding HTTP header.

This header informs the browser that the file has been compressed and specifies the compression method used.

You can verify that the server is correctly serving these files with the ‘Content-Encoding’ header in the networks tab.

After serving it correctly, the duplicate fetch should be fixed as well.

Regards,
Luke

I see. The files have to be compressed.

You may want to clarify this in your guide here:

Thank you.