Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Hook into the download event for media files

Vote:
 

Hi,

I would like to know, if there are any events exposed that i can hook into, on the dowload of media (pdf, docx etc.). 

In good old UnifiedFile world, we used to have these events but not sure about the current MediaData. I managed to find an article on episerver world describing to implement IRenderTemplate and IHttpHandler but not sure about the last bits...

//Do custom processing
//TransmitProcessedFile(customFile.BinaryData)

You can base your custom transmitter implementation on either EPiServer.Web.BlobHttpHandler or EPiServer.Web.MediaHandlerBase, 
and use the TransmitFile method for transmittance of file data.

Any pointers?

#199412
Nov 26, 2018 16:23
Vote:
 

Hi Tashir,

I think this blog post should point you in the right direction: http://fellow.aagaardrasmussen.dk/2016/06/12/how-to-intercept-the-download-of-a-media-file/

/Jake

#199417
Edited, Nov 26, 2018 18:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.