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

Any examples of imagebrowser implementation with Web API?

4 Answers 206 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 02 Sep 2016, 02:17 PM

HI. I'm looking to implement a kendo Editor and we want users to be able to upload files and images. So I got introduced to the imagebrowser component (let's forget the file browser for now and let's just focus on image) and I'm saying to myself, "well, what about the server side code? What does this component need served up?" A directory with this name was not found showed up when I first started playing with this component. That message most likely appeared because I'm just at the phase of copying and pasting in the code based on what's in the example on this site...

What's happening here on the backend? /kendo-ui/service/ImageBrowser/Read - is just one of many questions. 

I'm using Web API 2.0. JS on front end on an ASP.NET web form/aspx server page actually. I'm hoping there's some sort of canned example I can use somewhere for server side code? I wouldn't even know where to begin because I don't know what this component needs. Again I can either throw the code on the codebehind (c#) on the page itself, or I can use Web API (preferred). 

Thanks.

01.imageBrowser: {
02.    messages: {
03.        dropFilesHere: "Drop files here"
04.    },
05.    transport: {
06.        read: "/kendo-ui/service/ImageBrowser/Read",
07.        //read: "",
08.        destroy: {
09.            url: "/kendo-ui/service/ImageBrowser/Destroy",
10.            type: "POST"
11.        },
12.        create: {
13.            url: "/kendo-ui/service/ImageBrowser/Create",
14.            type: "POST"
15.        },
16.        thumbnailUrl: "/kendo-ui/service/ImageBrowser/Thumbnail",
17.        uploadUrl: "/kendo-ui/service/ImageBrowser/Upload",
18.        imageUrl: "/kendo-ui/service/ImageBrowser/Image?path={0}"
19.    }
20.},

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 06 Sep 2016, 11:47 AM
Hello Michael,

As a DEVCRAFT COMPLETE user, you can take advantage of the MVC examples and controllers.

I can suggest checking the offline demo example for the Editor with file and image browser. In the demo, there is a controller which you can use as an example.

To access the offline MVC demos, please use the file named:

"telerik.ui.for.aspnetmvc.(used version).commercial.msi"

In general, the WebAPI will not automatically decode multi-part form data requests, so it is up to the developer to achieve this. I can suggest checking the following information:

http://www.asp.net/web-api/overview/advanced/sending-html-form-data-part-2

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Michael
Top achievements
Rank 1
answered on 12 Sep 2016, 03:29 PM
Thanks. I'll look into this.
0
Michael
Top achievements
Rank 1
answered on 15 Sep 2016, 03:17 PM
I'm looking at this again; I'm sorry, can you please tell me where/how I can access the examples?
0
Stefan
Telerik team
answered on 19 Sep 2016, 06:37 AM
Hello Michael,

Please check the following article in our documentation on how to download Telerik UI for ASP.NET MVC, install it and then run a sample ASP.NET MVC application:

http://docs.telerik.com/kendo-ui/aspnet-mvc/introduction#download

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Editor
Asked by
Michael
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Michael
Top achievements
Rank 1
Share this question
or