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

Editor tools - insertFile : local file....

3 Answers 332 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 18 May 2017, 09:01 AM

Hi,

Possibly a stupid qs, but I'm wondering if it is possible to configure the insertFile tool in the editor to allow upload of files from a local drive, rather than just giving the option to insert a url to a file?

Currently the tool only gives me the option to insert a url.
We've implemented a bespoke attachment upload option which runs alongside the Kendo Editor, in a different app, but I'd prefer to avoid trying to redevelop it to fit into this app.

 

Cheers.

3 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 22 May 2017, 08:48 AM
Hello Terry,

I would like to ask you to elaborate a bit more on your question and the exact functionality that you aim to achieve. Just to make sure that we are on the same page - when an end user uploads an image, using the inserFile tool - this image is stored in the application local drive. Then the editor generates a URL to that file, just to the imaге.

On the other hand, if you need to directly  a word file, for example, this file should be first converted then loaded in the Editor. This functionality is demonstrated in our online MVC demo, where it is achieved at server-side:

http://demos.telerik.com/aspnet-mvc/editor/import-export



Regards,
Nencho
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
Terry
Top achievements
Rank 1
answered on 22 May 2017, 10:36 AM

Hi Nencho,

We use the editor in an app that allows users to create articles. Theyve asked for the ability to have attachments included with an article.

The insertfile toolbar option only allows the user to insert a url to whatever file they are inserting. So I was wondering if it was possible to configure it to upload from their local drives.

As far as I can see insertFile just askd the user to add a url that they can then click on.
I've since come up with a solution using a input type="file" with multiple attribute that allows them to upload 1 or more docs and I store those in a new table Ive created, as a blob type. So the issue is resolved, but I'd still be interested to know if its possible to upload local files via the editor, and if so, how would it be done, where are they stored (Im guessing we need to write code to handle this part) etc?

Thanks.

0
Bozhidar
Telerik team
answered on 24 May 2017, 10:15 AM
Hi,

This functionality is out of the scope of the Editor widget. If you want to you can check out our Upload widget, which can be used to achieve this:
http://demos.telerik.com/kendo-ui/upload/index

Otherwise the aproach you've taken is the correct one - use the editor for text editing, and handle the file upload outside of the widget.

Regards,
Bozhidar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Terry
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Terry
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or