File name one word with no spaces or special characters - Why?

Last post 03-29-2006, 11:27 PM by ben_da_dog@yahoo.co.uk. 2 replies.
Sort Posts: Previous Next
  •  03-29-2006, 6:54 PM 17735

    File name one word with no spaces or special characters - Why?

    Hi,

    We're just starting to use CuteEditor .NET for our clients and all is quite well. I just have an issue with the image upload.
    When trying to upload images, if the file contains a space it gives the error message:
    "[..] Please keep the file name one word with no spaces or special characters"

    My question is: why no space?

    we have tons of graphic content to upload for one client, and we have to rename everything because of this.
     
    windows handles space in filenames. web browsers do as well.

    so, why not CuteEditor?

    any feedback appreciated.

    Thanks.
    Ben[dog]

  •  03-29-2006, 11:14 PM 17736 in reply to 17735

    Re: File name one word with no spaces or special characters - Why?

    Ben,
     
    Please check the following article:

    http://cutesoft.net/developer+guide/Building-your-own-Image-Name-Filter.htm
     

    Building your own Image Name Filter

    This section is for Advanced Developers. Knowledge of the Regular Expressions is a prerequisite.

    Cute Editor has taken steps into image file name management. A new and innovative capability is to allow advanced developers to build the Image File Name Filter. Once a filter being set, only images whose names comply to the filter, will be displayed in the image dialog and is also allowed to be uploaded to the server. The other images are just being "filtered out".

    To setup a filter, you need to be familiar with Regular Expression. Regular Expressions are advanced forms of wildcards and allow you to set fitlers precisely.

     

      

     

    Cute Editor defines the following image name filter by default:


    ^[a-zA-Z0-9\._-]+$


     But you can modify it to meet your own requirements 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/Configuration/Security folder. In security policy file you can find the filenamePattern element. By default, it contains the following value:


    <security name="filenamePattern">^[a-zA-Z0-9\._-]+$</security>
      

    You can modify the filenamePattern element to meet your own requirements.

    For example:

    <security name="filenamePattern">^[a-zA-Z0-9\._-]+$</security>

     

     

    2: Programmatically define the image name filter


    C# Example:

    Editor1.Setting["security:filenamePattern"]= "^[a-zA-Z0-9\._-]+$";


    VB Example:

    Editor1.Setting("security:filenamePattern")= "^[a-zA-Z0-9\._-]+$"

    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

  •  03-29-2006, 11:27 PM 17737 in reply to 17736

    Re: File name one word with no spaces or special characters - Why?

    Hi,

    Thanks,

    I've already found that solution after searching further into the articles on the site.. but thanks anyway.

    Still doesn't explain, why is a space not allowed by default in the editor?

    This require a change to the security config file to enable, where it should be enabled by default.
    This will also cause the change to be reverted back to original value anytime we upgrade the file to a new version.

    so, why such a choice?

    Ben

View as RSS news feed in XML