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

Forums / Developing with Sitefinity / How do I set UsesOriginalExtensionMapping for avoid content download?

How do I set UsesOriginalExtensionMapping for avoid content download?

8 posts, 0 answered
  1. Augusto Radtke
    Augusto Radtke avatar
    24 posts
    Registered:
    16 Apr 2010
    30 Aug 2010
    Link to this post
    Hello,

    I´m uploading some Flash files to a library which I use as a source for a banner control. The problem is that the Flash is being downloaded instead of inline rendering because of it´s content type mime. I saw that the content handler check for a property called UsesOriginalExtensionMapping to avoid this behavior but I don´t know where to set it.

    There is any specific place in the web.config that I can set this property for certain kind of files?

    Thank you,

    Augusto
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Aug 2010
    Link to this post
    Hi Augusto Radtke,

    You can take a look at this KB - How to use the real extensions for the items in the Images and Documents module.
    Note that changes will apply over the newly uploaded items and you will need to reupload the old one in case you want to use real extensions for them.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Keith
    Keith avatar
    67 posts
    Registered:
    13 Sep 2010
    18 Oct 2010
    Link to this post
    I am actually having this same problem...I have a flash control (JWplayer) that I need to play a bunch of videos in Images & Documents...if the extension is .sflb.ashx they won't play...so I followed the instructions in the KB link.  The direct URL to the video now shows the file's real extension instead of .ashx, but the file won't play and I can't access it directly using the URL either.  Even the download link in the images & documents module doesn't work!
    If I comment out this line:
    <add key=".mp4"/>
    in web.config, it will resolve back to .sflb.ashx and I can access the file again, but jwplayer doesn't like that extension so I have to get this to work.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    18 Oct 2010
    Link to this post
    Hello Keith,

    The mp4 extension is valid only for files that will be uploaded after you enable original extension mapping, otherwise the file is processed with sflb.ashx extension.

    Another option is extending JWplayer script to include sflb.ashx extension. This should work, because we do not change the mime type of the file.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Keith
    Keith avatar
    67 posts
    Registered:
    13 Sep 2010
    18 Oct 2010
    Link to this post
    I tried re-uploading the files after I applied the instructions in the KB but I still have the same problem.

    I was able to resolve it by extending the JWplayer script to just handle the ashx extension, but I am still curious as to why the extension mapping won't work
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    18 Oct 2010
    Link to this post
    Hello Keith,

    You may experience this issue if you have not added HandlerMapping for .mp4 file in IIS. I do not see any other possible reason for this behavior.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Keith
    Keith avatar
    67 posts
    Registered:
    13 Sep 2010
    18 Oct 2010
    Link to this post
    How do you do this? I have IIS 6
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    18 Oct 2010
    Link to this post
    Hi Keith,

    You can take a look at MSDN, since this is a general knowledge of ASP.NET and IIS configuration for websites.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
8 posts, 0 answered