Re: Disallowing Uploads

  •  08-24-2007, 11:44 AM

    Re: Disallowing Uploads

    Chris,

    You can easily disable upload using the following methods:

    1: Edit security policy file.

    The security policy file (default.config, admin.config and guest.config) can be found in the CuteEditor_Files/Configuration/Security folder. In security policy file you can find the MaxImageSize element which contains the value of max image file upload size limit (in kbs).  By default, it contains the following value:

    <security name="AllowUpload">true</security>
     <security name="AllowCreateFolder">true</security>
     <security name="AllowRename">true</security>
     <security name="AllowDelete">true</security>
     
    You can set the above value to false to meet your requirements.

    For example: 

    <security name="AllowUpload">false</security>
     <security name="AllowCreateFolder">false</security>
     <security name="AllowRename">false</security>
     <security name="AllowDelete">false</security>


    2: Programmatically disable upload.
    In some situation, you can detect who is the admin user. In this situation, you can allow the admin upload the files, and disallow the other users upload/delete/create files.
     
    Example:
     
    If Not IsAdmin then

       editor.AllowUpload= false   
       editor.AllowCreateFolder= false   
       editor.AllowRename= false   
       editor.AllowDelete= false
     
    End If
     
    >>P.S. By the way, why are your Css Class and other combos the same height as the buttons? Is that something you could only achieve in the .Net version? On the ASP control they are too tall, not lining up in height with the other buttons.
     
    It should to be the same height.

    Check this demo:
     
     
    Hope it helps. Let me know if you have any further questions.
     
     
     
     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread