Custom code in GetFile.aspx.cs

Lei Kin Man asked on March 15, 2017 10:05

For some security reasons, we want to mask/change the filename of attachment by modifying the response header. Before version 10, we can implement custom code at GetFile.aspx.cs. But now, since the GetFile.aspx.cs file has been removed, where can I implement the same logic?

Thanks

Recent Answers


Hanh Dang answered on March 16, 2017 09:22

I have used a global system event to prevent public user download file from Media Libraries. It may helps you too:

https://docs.kentico.com/k10/custom-development/handling-global-events/reference-global-system-events#Reference-Globalsystemevents-ObjectEvents

0 votesVote for this answer Mark as a Correct answer

Lei Kin Man answered on March 16, 2017 09:40

Now I'm implementing a custom module to handle event of PreSendRequestHeaders. By this way, I can add the HttpHeader to mask/change the filename before user download the file. But in this way, how can I know what is the alias path of the attachment? Because I don't want to mask/change all the filename.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.