More in this section

Forums / Developing with Sitefinity / problems with images and documents module

problems with images and documents module

11 posts, 0 answered
  1. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    14 Jul 2008
    Link to this post
    Hi

    I've just tried to create a new document library, but when i try and open the PDF file i've just uploaded it says page cannot be displayed

    it's trying to link to 
    Libraries/test/Level1%20U6.sflb?download=true

    The file seemed to upload ok, but it doesn't exist,
    where can i check to see if the file uploaded ok? and is this a known issue?
    thanks
  2. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    14 Jul 2008
    Link to this post
    Hello Quade,

    Most probably, the ISAPI mappings for .sflb and .tmb extensions are not set on your IIS virtual directory on the server. Please refer to section Configuring IIS of the Sitefinity User Manual or section Troubleshooting for details. 
    Don't forget to register the ContentHttpHandler handler for the extensions in the application web.config as well:

    <httpHandlers>  
        <add verb="GET" path="*.sflb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine" />  
        <add verb="GET" path="*.tmb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine" />  
    </httpHandlers> 

    Let us know if you need any further assistance.

    Sincerely yours,
    Rebecca
    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  3. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    14 Jul 2008
    Link to this post
    thanks Rebecca

    Unfortunatly, that didn't work
    i recycled IIS, deleted the library and recreated it.

    Any other suggestions?
    I goes directly to a 404 page
  4. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    14 Jul 2008
    Link to this post
    Hello Quade,

    Does this only happen in this particular new document library or you cannot view items in old ones as well? Can you upload and view other types of items, e.g. Image library items with .tmb extension? 

    Also, please double-check if you have cleared the "Check/Verify that file exists" checkbox, as this is something that people miss very often.

    Looking forward to your reply,
    Rebecca
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    15 Jul 2008
    Link to this post
    Thanks

    I've tried uploading 2 images, but when i get to the screen "batch edit" where it asks for the title and alternative text, the preview of the image doesn't show, it just has a broken image link icon

    the source of one of the images is
    /Libraries/images/04072008041.tmb?width=150&height=150&decreaseOnly=true


    also i dont see where the "Check/Verify that file exists" checkbox is

    thanks
  6. Rebecca
    Rebecca avatar
    536 posts
    Registered:
    24 Sep 2012
    15 Jul 2008
    Link to this post
    Hello Quade,

    I don't know which version of IIS you are using. I am attaching images for each version so you can check this.

    Sincerely yours,
    Rebecca
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    15 Jul 2008
    Link to this post
    Rebecca you are a star!

    that worked a treat!
    Thanks for that, it was driving me nuts
    :o)
  8. dimiter
    dimiter avatar
    13 posts
    Registered:
    25 Apr 2007
    03 Apr 2009
    Link to this post
    Hi

    I want to set up image for every document in the my  document  libarary list which will show type of the document. Is that possible? Could you help me ?

    Greetings  
  9. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    03 Apr 2009
    Link to this post
    Hi Dimiter,

    If I understood you correctly, you want each document type to have its own representation in the list. This is actually the default behavior, please check the attached screen shot.

    Let me know if I am missing something.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  10. dimiter
    dimiter avatar
    13 posts
    Registered:
    25 Apr 2007
    03 Apr 2009
    Link to this post
    Hi Georgi

    I mean when I am using this list in a public site just name of the file appears, size, author, but  not image of the document type

    Greetings
  11. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    06 Apr 2009
    Link to this post
    Hello dimiter,

    There are two things you could try:
    * Override the DownloadList control, and create a new template for it. You could have an access to each IContent item showed in it. Then you can check the MimeType to see if it is a document or an image for example. Please see the example below.
    * Create a new control which is showing the links for your files. I personally prefer this approach. Here is the code that you could be using:
    LibraryManager LibManager = new LibraryManager();  
    IList items = LibManager.GetContent();  
      
    foreach (IContent item in items)  
    {  
      
            if (item.MimeType.Equals("image/jpeg"))  
            {  
                //this is an image (jpeg) 
            }  
            else if (item.MimeType.Equals("application/vnd.openxmlformats-officedocument.wordprocessingml.document"))  
            {  
                 
            }  
     
        }  
    }  

    Based on the MimeType, you could construct different links - such showing an image of a document something else.

    I hope this helps.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
11 posts, 0 answered