upload file to Sharepoint 2013 document library for LinkManager

15 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 11 Jul Link to this post

    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>

  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 11 Jul Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 11 Jul in reply to Stanimir Link to this post

    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

  5. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 12 Jul Link to this post

    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.
  6. Donald
    Donald avatar
    10 posts
    Member since:
    Jan 2009

    Posted 16 Jul in reply to Stanimir Link to this post

    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

     

  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 18 Jul Link to this post

    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.
  8. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 18 Jul Link to this post

    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

  9. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 18 Jul in reply to Benjamin Link to this post

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

     

  10. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 19 Jul in reply to Benjamin Link to this post

    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"

  11. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 19 Jul in reply to Benjamin Link to this post

    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?

  12. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 19 Jul Link to this post

    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

  13. Donald
    Donald avatar
    10 posts
    Member since:
    Jan 2009

    Posted 19 Jul in reply to Marin Bratanov Link to this post

    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

     

     

  14. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 21 Jul Link to this post

    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.
  15. Benjamin
    Benjamin avatar
    51 posts
    Member since:
    Jul 2016

    Posted 21 Jul in reply to Marin Bratanov Link to this post

    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. 

  16. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 22 Jul Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017