Should IMediaContentDownloadedEvent record all downloads fro

Posted by Community Admin on 04-Aug-2018 20:22

Should IMediaContentDownloadedEvent record all downloads from /docs/default-source/... regardless of how it was accessed?

All Replies

Posted by Community Admin on 16-Mar-2015 00:00

We're running Sitefinity 7.3.5610 and I have an event handler for IMediaContentDownloadedEvent, which is working and catching activity whenever I download a file from the Admin site (via the Content>Documents & Files menuing).  Our problem is that it is not firing when a file is downloaded via the front end, nor if someone were to bookmark the URL of the document and re-access it later.  Shouldn't this event fire off for any completed download of the /docs/default-source/... subsystem regardless of how the document was accessed?

If the event is only for back-end access, we have an issue and would like to know if there's a way to record such access.  Since the URL of documents becomes exposed when they are downloaded, I cannot prevent someone from bookmarking an actual document.  I've noticed that security is roughly enforced so I'm not concerned about the security, but our ability to keep an accurate log of access activity.

 

Thanks in advance!

Posted by Community Admin on 19-Mar-2015 00:00

Hi Steve,

The Media Content Download Events are fired on frontend media download and you can subscribe for download / downloading / downloaded content respectively.

You can do this in the Global.asax file as described in that article.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 19-Mar-2015 00:00

Thank-you Svetoslav for the response.  Previously we were directed to implement via the Properties/AssemblyInfo.cs.  Is Global.asax now the preferred method?  They should produce the same results I would expect.

 

I believe I have identified that this can/should work as I expected, and part of the cause may be a caching issue.  It would seem that somehow the Sitefinity admin screens are forcing a no-cache solution when one clicks the [Open the file] button; our front-end is using the URL provided by the MediaContent object.  It seems that the Admin screens append a querystring parameter (status=Temp...) which the MediaContent object does not provide and therefore our front end does not utilize.  Is there any guidance on how we should utilize the querystring? is the status relevant to caching headers?

 

Thanks,

Steve

Posted by Community Admin on 24-Mar-2015 00:00

Hi Steve,

I would recommend you to do it in Global.asax as proposed.

Furthermore I have check this on cached page and it seems works fine and the events are thrown.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed