Re: Storage provider and Upload provider

  •  01-31-2013, 12:55 PM

    Re: Storage provider and Upload provider

    Hi smondala,

     

    The database is not the necessary part for RichTextEditor, if you do not need to store the files into database, then please refer to http://www.richtexteditor.com/deployment/rich-text-editor-aspnet.aspx, it shows you the full steps to deploy the RichTextEditor into your site. And the RichTextEditor will work for asp.net and mvc both.

     

     Here are the full steps to store the files into ms sql database, hopl it help.

    Sql File Provider Notes

    The following guide shows the steps to config MSSQL Server file provider in RichTextEditor.

    1. Add Provider code to project

    Copy SqlFileProvider.cs file to your application App_Code folder.

    2. Create file storage items table in database

    Execute fsitems.sql against your existing database or create a new database.

    3. Set sql connection string to SqlFileProvider

    Update SqlFileProvider.cs to use your custom connection string.

    static public string ConnectionString
    {
      get
      {
        return "server=(local);database=rtedb;trusted_connection=false;uid=test;pwd=test;";
      }
    }

    4. Set FileProviderType of RichTextEditor and copy download.ashx to your application

    Copy SqlFileProvider/download.ashx to your website folder, you can rename it.

    Use SetSecurity method to set the FileProviderType.

    Editor1.SetSecurity("*", "*", "FileProviderType", typeof(SqlFileProvider).AssemblyQualifiedName);
    Editor1.SetSecurity("*", "*", "StoragePath", "/");
    Editor1.SetSecurity("*", "*", "FileProviderArg0", "download.ashx?file=");
     

    Regards,

     

    Ken 

View Complete Thread