This is a migrated thread and some comments may be shown as answers.

ImageBrowser Missing File Icon

2 Answers 85 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Iron
Joel asked on 06 Sep 2019, 10:43 AM

Hi,

  I am using ImageBrowser as a standalone widget without Editor.

<div>
                    @(Html.Kendo().PanelBar()
                        .Name("panelbar")
                        .ExpandMode(PanelBarExpandMode.Multiple)
                        .Events(events => events
                                .Expand("onExpand")
                            )
                        .Items(panelbar =>
                        {
                            panelbar.Add().Text("Image Browser")
                                .Expanded(false)
                                .Content(@<div id="imgBrowser"/>);
                        })
                    )
</div>
 
<script>
    $("#imgBrowser").kendoImageBrowser({
        transport: {
            type: "imagebrowser-aspnetmvc",
            read: "/ImageBrowser/Read",
            destroy: {
                url: "/ImageBrowser/Destroy",
                type: "POST"
            },
            create: {
                url: "/ImageBrowser/Create",
                type: "POST"
            },
            imageUrl: "@Url.Content("~/shared/UserFiles/Images/{0}")",
            thumbnailUrl: "/ImageBrowser/Thumbnail",
            uploadUrl: "/ImageBrowser/Upload",
        },
        change: insertImagePath
    });
</script>

 

When the PanelBar is expanded & ImageBrowser is loaded, the file icon is missing. Please see the attached picture.

Can you let me know how to display the file icon?

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 11 Sep 2019, 07:40 AM

Hi Joel,

If you need to display the default thumbnail icon for the files loaded by the ImageBrowser, you should simply skip the thumbnailUrl configuration:

$("#imgBrowser").kendoImageBrowser({
    transport: {
        type: "imagebrowser-aspnetmvc",
        read: "/ImageBrowser/Read",
        destroy: {
            url: "/ImageBrowser/Destroy",
            type: "POST"
        },
        create: {
            url: "/ImageBrowser/Create",
            type: "POST"
        },
        imageUrl: "@Url.Content("~/shared/UserFiles/Images/{0}")",
        //thumbnailUrl: "/ImageBrowser/Thumbnail",
        uploadUrl: "/ImageBrowser/Upload",
	},
	change: function (e) { }
});

Attached you will find a small sample implementing the above suggestion.

I hope that this helps. If you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Joel
Top achievements
Rank 1
Iron
answered on 12 Sep 2019, 01:02 AM

Hi Veselin,

  It works. 

  Thanks.

Tags
Editor
Asked by
Joel
Top achievements
Rank 1
Iron
Answers by
Veselin Tsvetanov
Telerik team
Joel
Top achievements
Rank 1
Iron
Share this question
or