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

Forums / Developing with Sitefinity / How can I avoid .sflb extention to the files uploaded in Sitefinity Libraries?

How can I avoid .sflb extention to the files uploaded in Sitefinity Libraries?

5 posts, 0 answered
  1. Stanimira
    Stanimira avatar
    12 posts
    Registered:
    30 Jan 2009
    30 Jan 2009
    Link to this post
    How can I avoid .sflb extention to the files uploaded in Sitefinity Libraries?
    This cause many troubles to the end users who try to download .doc, .pdf and other files.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    30 Jan 2009
    Link to this post
    Hi Stanimira,

    Thank you for using our services.

    There is only one way to have the files with their extensions. You need to filter the default ContentHttpHandler. Please take a look at http://www.sitefinity.com/support/knowledge-base/kb-article/b1154K-bbah-b1154T-cmm.aspx

    In 3.5 SP1 files can be downloaded with their extensions.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Stanimira
    Stanimira avatar
    12 posts
    Registered:
    30 Jan 2009
    02 Feb 2009
    Link to this post
    Hi Ivan,

    Thank you veru much for the answer, however I am afraid it wouldn't work properly for our project.

    1. We cannot use SP1, because we have some custom development. We are not quite sure what exactly will be installed with SP1.
    2. What will happen with all the existing files in the libraries if I create a class which extends the ContentHttpHandler base class and overrides the ProcessContentItem method? I mean what will happen with the links in the website pages published? Will they become invalid?

    I guess that the effortless way will be to change the way users have to work using Files instead of Libraries.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    03 Feb 2009
    Link to this post
    Hello Stanimira,

    If you add the handler from the KB you will be able to use all files with their original extensions as well as with sflb.ashx extension that Sitefinity appends.

    Example:
    Let's say you have: Image.sflb.ashx. If you try to call the image like Image.jpg you will get an error - not found.
    after applying the KB: you can call Image.jpg as well as Image.sflb.ashx.

    The solution just checks the mime type required item.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Stanimira
    Stanimira avatar
    12 posts
    Registered:
    30 Jan 2009
    05 Feb 2009
    Link to this post
    Hello, Ivan,

    Thanks for the answer. I will apply this class later this month and will post a comment how it works.

    Mira
Register for webinar
5 posts, 0 answered