Any examples of imagebrowser implementation with Web API?

5 posts, 0 answers
  1. Michael
    Michael avatar
    21 posts
    Member since:
    Jan 2016

    Posted 02 Sep Link to this post

    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.},

  2. Stefan
    Admin
    Stefan avatar
    270 posts

    Posted 06 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Michael
    Michael avatar
    21 posts
    Member since:
    Jan 2016

    Posted 12 Sep in reply to Stefan Link to this post

    Thanks. I'll look into this.
  5. Michael
    Michael avatar
    21 posts
    Member since:
    Jan 2016

    Posted 15 Sep in reply to Stefan Link to this post

    I'm looking at this again; I'm sorry, can you please tell me where/how I can access the examples?
  6. Stefan
    Admin
    Stefan avatar
    270 posts

    Posted 19 Sep Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready