Problem uploading files - name does not allow blank

  •  06-28-2010, 4:36 AM

    Problem uploading files - name does not allow blank

    I have a problem uploading files - the standard Windows filename allows blanks, but the user is presented with an error message, when trying to upload such a file:
     
    "File name not allowed. Please keep the filename one word with no spaces or special characters".
     
    I am using the standard setting in the three config files:

    <security name="filenamePattern">

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

    </security>
     
    I tested the expression in several regular expression testers and found it to accept blanks in the filename. I even could make it much easier with the same positive result with
    ^[\w\._\s-]+$
     
    As far as I have seen in the testers and in the definition, the \s should allow whitespace characters, but it doesn't when uploading? What else has to be prepared on IIS side or elsewhere? We refreshed the pool already.
     
    Additionally, there seems to be a problem with file extensions. I had a very long list for file extensions when uploading files

    <security name="DocumentFilters">

    <item>avi</item>

    <item>bat</item>

    <item>bmp</item>

    <item>cf</item>

    <item>chm</item>

    <item>class</item>

    <item>cmd</item>

    <item>csv</item>

    <item>ctl</item>

    <item>dat</item>

    <item>dll</item>

    <item>dis</item>

    <item>doc</item>

    <item>docx</item>

    <item>dux</item>

    <item>edi</item>

    <item>evt</item>

    <item>exe</item>

    <item>fmb</item>

    <item>gif</item>

    <item>htm</item>

    <item>html</item>

    <item>ica</item>

    <item>ics</item>

    <item>ini</item>

    <item>jar</item>

    <item>jpeg</item>

    <item>jpg</item>

    <item>lcf</item>

    <item>log</item>

    <item>lst</item>

    <item>mdb</item>

    <item>mpp</item>

    <item>msg</item>

    <item>out</item>

    <item>pdf</item>

    <item>pkb</item>

    <item>pkg</item>

    <item>pks</item>

    <item>plb</item>

    <item>plh</item>

    <item>pll</item>

    <item>pls</item>

    <item>png</item>

    <item>ppt</item>

    <item>pptx</item>

    <item>prc</item>

    <item>properties</item>

    <item>ps</item>

    <item>rar</item>

    <item>rdf</item>

    <item>reg</item>

    <item>rtf</item>

    <item>sql</item>

    <item>tab</item>

    <item>tif</item>

    <item>trc</item>

    <item>tsv</item>

    <item>txt</item>

    <item>upx</item>

    <item>vsd</item>

    <item>vsdx</item>

    <item>wft</item>

    <item>wfv</item>

    <item>wwb</item>

    <item>xla</item>

    <item>xls</item>

    <item>xlsx</item>

    <item>xml</item>

    <item>zip</item>

    </security>

    But it did not show all available files in the directory of the user (e.g. no .xls, even they are in the list). I made this list shorter - and now it works for the basic file types.
     
    Can I get it to work for more file types? Is there any restriction in the number of items?
     
    Is there a difference between "normal" users and "admins" - if the .config files look the same? And how can I get it the same?
View Complete Thread