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

show image in viewer

3 Answers 91 Views
FileManager
This is a migrated thread and some comments may be shown as answers.
hamed
Top achievements
Rank 1
hamed asked on 24 Aug 2020, 11:01 AM

hi

I try to show my image instead of the icon of image in viewer.

i use 

.Views(v=>v.List(a=>a.TemplateId("template")))

 

<script id="template" type="text/kendo-ui-template">
<img src="~/Content/UserFiles/Folders/Images/demos-web.png"/>  
</script>

 

bot it dose not show any things.

i upload two image show with template and without template.

thank you.

3 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 26 Aug 2020, 09:13 AM

 Hello, Hamed,

The demonstrated implementation seems correct, and I have doublechecked it at my end. Could you please inspect your browser console for any js errors? Also, make sure that the files are present in the directory (would observe an error in the console if that cannot be found by the filemanager). 

As a reference, below is a dojo example, demonstrating that the templating approach successfully changes the image, with the provided one (example in js, but the approach is the same):

https://dojo.telerik.com/@nenchef/iZAyiqUF

Regards,
Nencho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
mehran
Top achievements
Rank 1
answered on 10 Nov 2020, 09:16 AM
what we must do if we want show the file image in Viewer?
0
mehran
Top achievements
Rank 1
answered on 10 Nov 2020, 11:14 AM

actually i found solution do like this:

<img src="@Url.Content("~/Content/UserFiles/Folders/#=path#")"/>

Tags
FileManager
Asked by
hamed
Top achievements
Rank 1
Answers by
Nencho
Telerik team
mehran
Top achievements
Rank 1
Share this question
or