+1-888-365-2779
Try Now
More in this section

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

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

4 posts, 0 answered
  1. Steve
    Steve avatar
    2 posts
    Registered:
    02 Nov 2012
    16 Mar 2015
    Link to this post

    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!

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    06 Dec 2016
    19 Mar 2015
    Link to this post
    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
     
  3. Steve
    Steve avatar
    2 posts
    Registered:
    02 Nov 2012
    19 Mar 2015 in reply to Svetoslav Manchev
    Link to this post

    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

  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    06 Dec 2016
    24 Mar 2015
    Link to this post
    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
     
4 posts, 0 answered