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

Kendo Image browser with Editor in MVC

1 Answer 319 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lida
Top achievements
Rank 1
Lida asked on 19 Aug 2015, 09:01 AM

Hi Team,

 I am using kendo UI editor and image browser in MVC View in form of HTML. I have to upload an image. I have created one action method and bound to the upload function of image browser. When i upload, image gets saved to the location and after that an automatic thumbnail call goes to app which has a url and pass the path parameter which is the file name. In case of new file upload it pass the path value to undefined. In upload action i am returning json response in form of:

 var json = new    {              name = Path.GetFileName(file.FileName),

                    type = "f",

                    size = file.ContentLength
                };
                return Json(json, "text/plain");

 

Thumbnail action method is the default action method of  EditorImageBrowserController class which i am using.

Please let me know if i am missing anything or do i need to override thumbnail action. If yes please provide me example.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Aug 2015, 12:42 PM
Hello Lida,

Please avoid posting duplicate forum threads and support tickets. Thank you for understanding.

For the record and anyone else's information, the issue was caused by the lowercased first letters of the "name", "type" and "size" keys in the JSON response. These first letters should be uppercase (when using the Editor's MVC wrapper). A sample implementation can be seen in the FileBrowserController abstract class that is normally inherited in such cases.

Regards,
Dimo
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
Lida
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or