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

upload file to Sharepoint 2013 document library for LinkManager

14 Answers 275 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 11 Jul 2016, 08:56 AM

Hi,

i have tried the link manager on RadEditor and got it to work for uploading the document into local file system when user tried to create a download link.

i would like to check how do i preform the same action but the document is to be upload to SharePoint document library

current mockup

1.<telerik:RadEditor ID="txtOverview" runat="server" ToolsFile="~/ToolsFile.xml" EditModes="Design">
2.         <DocumentManager ViewPaths="~/Documents" UploadPaths="~/Documents" />
3.</telerik:RadEditor>

14 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 11 Jul 2016, 10:55 AM
Hello,

In order for RadEditro to be able to upload files to a SharePoint library it needs to be setup with a custom content provider. RadEditor for SharePoint 2013 has such provider integrated. You can find more information about Telerik WebParts for SharePoint in the following online article: http://www.telerik.com/products/aspnet-ajax/sharepoint-web-parts.aspx.

If you decide that you need to implement a custom content provider you will find helpful information in the following resources:
Editor - Custom File Dialogs Content Provider
Use Custom FileBrowserContentProvider
http://www.telerik.com/blogs/using-the-radfileexplorer-for-asp-net-ajax-in-sharepoint-2010-web-parts

In addition, if you have the required license, we provide the source code of RadEditor for Shaerpoint on demand so you will be able to see its implementation of the content provider.

Regards,
Stanimir
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Benjamin
Top achievements
Rank 1
answered on 12 Jul 2016, 01:49 AM

Hi Stanimir,

i am unable to go to the first link "You can find more information about Telerik WebParts for SharePoint in the following online article: http://www.telerik.com/products/aspnet-ajax/sharepoint-web-parts.aspx.". upon clicking the browser only show about:blank

0
Stanimir
Telerik team
answered on 12 Jul 2016, 07:13 AM
Hello,

Here is the updated link: http://www.telerik.com/products/aspnet-ajax/sharepoint-web-parts.aspx.
In addition check the following download link: http://www.telerik.com/download/sharepoint-web-parts


Regards,
Stanimir
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Donald
Top achievements
Rank 1
answered on 16 Jul 2016, 01:26 PM

Hi Stamnir,

I am using the SharePoint 2013 Online that comes is my Office 365 Business Premium license.  How do I install "Web Parts for SharePoint" in my instance of this SharePoint Online?

I want to open and save documents from SharePoint Online in Rad Editor using its document Explorer in my Rad .Net Ajax based Azure Visual Studio Application.

Thanks,

Donald

 

0
Marin Bratanov
Telerik team
answered on 18 Jul 2016, 10:20 AM

Hello Donald,

For Office 365 you can use the Kendo UI widgets, because its application model does not allow WebForms components like the UI for ASP.NET AJAX ones.

You may find the following posts interesting in starting your development:

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Benjamin
Top achievements
Rank 1
answered on 19 Jul 2016, 03:21 AM

Hi sorry for posting here again.

would like to know if there is a custom file provider to link sharepoint document library with the editor document manager?

the link provided above is for editor as a sharepoint web part. i need the editor to be in my ascx file which is a custom sharepoint 2013 web part

0
Benjamin
Top achievements
Rank 1
answered on 19 Jul 2016, 04:56 AM

Hi i followed the sample here

i receive at 403 forbidden when i click on the document manager on the HyperLink Manager

 

code

01.string[] libraryPath = getSPLibraryPaths();
02.           
03.editor.DocumentManager.UploadPaths = libraryPath;
04.editor.DocumentManager.ViewPaths = libraryPath;
05.editor.DocumentManager.AllowMultipleSelection = false;
06.editor.DocumentManager.MaxUploadFileSize = 2097152; // 2Mb
07.editor.DocumentManager.SearchPatterns = new string[] { "*.doc", "*.docx", "*.xls", "*.xlsx", "*.ppt", "*.pptx", "*.pdf", "*.jpg", "*.jpeg", "*.png" };
08.           editor.DocumentManager.ContentProviderTypeName = typeof(SPContentProvider).AssemblyQualifiedName;
09. 
10.private string[] getSPLibraryPaths()
11.       {
12.           List<String> paths = new List<String>();
13.           //get a list of all SharePoint libraries in the current web
14.           SPSecurity.RunWithElevatedPrivileges(delegate ()
15.           {
16.               SPListCollection docLibraries = RetrieveDocumentLibraries(SPContext.Current.Web);
17.               //remove libraries that should not be visible in the FileExplorer
18.               foreach (SPList list in docLibraries)
19.               {
20.                   if (SPContentProvider.IsNotSystemFolder(list.RootFolder))
21.                   {
22.                       paths.Add(list.RootFolder.ServerRelativeUrl);
23.                   }
24.               }
25.           });
26.           
27.           string[] convertedPaths = paths.ToArray();
28.           return convertedPaths;
29.       }
30.       private SPListCollection RetrieveDocumentLibraries(SPWeb web)
31.       {
32. 
33.           SPListCollection documentLibraries = web.GetListsOfType(SPBaseType.DocumentLibrary);
34.           documentLibraries.ListsForCurrentUser = true;
35.           documentLibraries.IncludeRootFolder = true;
36.           SPContext.Current.Site.CatchAccessDeniedException = true;
37.           return documentLibraries;
38.       }

 

0
Benjamin
Top achievements
Rank 1
answered on 19 Jul 2016, 08:33 AM

Hi.. i am pretty new to Sharepoint. i would like to know also is it possible to edit the ContentProvider in the sample to only display 1 Document Library?

the document library list that i would like to show is "Documents"

0
Benjamin
Top achievements
Rank 1
answered on 19 Jul 2016, 09:38 AM

hi. i am able to see the item in my list now. but i only wants it to display 1 document library with the title "Documents".

how do i do that?

0
Benjamin
Top achievements
Rank 1
answered on 19 Jul 2016, 10:09 AM

HI can i also check. where do i edit the code such that the when user select a item, it will return the full link..

currently the code return /sites/subsites/Documents/accounts.xls

i want it to return https://www.mysharepointsite.com/sites/subsites/Documents/accounts.xls

0
Donald
Top achievements
Rank 1
answered on 19 Jul 2016, 01:56 PM

Hi Marin,

I already use Kendo UI.  However, after a careful search,  I cannot find any "Document Manager" / "File Picker" / "File Explorer" capability in Kendo UI.  Did I miss something?

If you sent me a link to the source code of RadEditor for Shaerpoint on demand, can I use its custom content provider with my RAD ASP.NET AJAX RadEditor as is?

If so, you will see that I have the required licence.  Could you send me the link to that source code?

Many Thanks,

Donald

 

 

0
Marin Bratanov
Telerik team
answered on 21 Jul 2016, 08:23 AM

Hello Donald,

The Kendo Editor has file manager dialogs: http://demos.telerik.com/kendo-ui/editor/imagebrowser.

As for the provider source for the SharePoint RadEditor—we do not usually provide the source code for the SharePoint web parts (it is not available by default in your account where you can download the Telerik.Web.UI source code, for example).

@Benjamin: to use RadEditor in a custom web part and still benefit from the built-in content provider we have for SharePoint, you should use the SPRadEditor class (control) which is what we internally use in editor the web part we provide. It is in the RadEditorSharePoint  assembly. You can read more about this in this forum thread.

To modify the link, you can try the following:

 

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Benjamin
Top achievements
Rank 1
answered on 21 Jul 2016, 01:10 PM

Hi marin

Thanks for your reply .  I have got the stuff to work.  But now i seem to have an issue getting radeditor to use the customised built in dialog.  I have specify the externaldialogurl parameter and ensure the dialogs are at the path .  But it seems that the editor is still using the old ones. 

0
Marin Bratanov
Telerik team
answered on 22 Jul 2016, 08:29 AM

Hello Benjamin,

The most common reasons for such a problem are the following:

  • the modified dialogs are not published to the production/staging/QA server so the customized files are actually missing.
  • the path on the server is different from the path in development so, effectively, the modified files are not in the location the editor is looking for

I also suggest you review this article for an example: http://docs.telerik.com/devtools/aspnet-ajax/sharepoint/2010/radeditor-web-part/customization/modfying-built-in-dialogs

Regards,

Marin Bratanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Benjamin
Top achievements
Rank 1
Donald
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or