Can not upload excel files

Last post 09-14-2010, 2:44 PM by mlockett. 9 replies.
Sort Posts: Previous Next
  •  08-26-2010, 12:39 PM 63650

    Can not upload excel files

    Hi!
    As the title says - i cannot upload excelfiles in the editor.
    word, pdf and so forth works fine.
     
    I've edited the Configuration/Security/Admin file with:
    <item>.xls</item>
     <item>.xlsx</item>
    to the<security name="DocumentFilters">
     
    Doesn't work
     
    Added:
    $Editor->DocumentFilters(".doc,.pdf,.xls,.xlsx");
    to my init function...dosen't work.
     
     
    all i get is:
    application/vnd.ms-exceleeFile format not allowed! Please contact site administrator.
     
     
    What shall I do?
     
    Thanks
     
    /bix
     
  •  08-26-2010, 1:24 PM 63654 in reply to 63650

    Re: Can not upload excel files

    "\cuteeditor_files\Configuration\Security", you can find 3 security policy files in this folder, which security policy file are you using? you can try to add "xls" and "xlsx" in all 3 security policy files. If it stil doesn't work, please check
    <security name="DocumentFilters">   // When you click "Downloadable files"
    <security name="ImageFilters">  // When you click "Insert Image" and "Image Gallery"
    <security name="MediaFilters"> //When you click "Insert Media"
     
    Which button did you click when you have this issue?
    Keep us posted.
     
    Regards,
    Eric
     
  •  08-26-2010, 2:31 PM 63658 in reply to 63654

    Re: Can not upload excel files

    I 've already added it to all three files in the security folder, but I'm only using admin file.
    Also, as stated above, I've added .xls and .xlsx to DocumentFilters since it is when I click "Downloadble files" (Dunno what is says in english  since I use swedish, but directly translated it should be something like that) that i get the error.
     
    Guess your next question will be what version I use, how do I see that? ;)
     
    regards:
    /bix
  •  08-26-2010, 3:29 PM 63661 in reply to 63658

    Re: Can not upload excel files

    How to detect the current version? 
    You can upgrade to latest version and check it again.
     
    Regards,
    Eric
  •  08-26-2010, 5:37 PM 63676 in reply to 63661

    Re: Can not upload excel files

    noooooo...can't upgrade again. Have made alot of alterations to this otherwise exellent product.
    Can't go through upgrading all the sites I've built again. Allready done it a couple of times....
     
    I want it to work in my 6.1 verion. My customer just need this to work and it takes alot longer to upgrade and adjust a new version.
    I haven't adjusted "uploadable documents", and other documents work fine to upload.
     
    So, what to do now?
    Any other way to fix this?
    Any other setting I must look at, or must I check the code handling the uploads?
     
    btw, thanks for your quick answers!
     
    regards
    /Bix
  •  08-27-2010, 7:31 AM 63691 in reply to 63676

    Re: Can not upload excel files

    Ok, now I've tried this quick and dirty solution:
    Added my own array with extensions in filepost.php, and if the original way didnt work, check my array
     
        $arr_xl=array(".xls",".xlsx");
        if (in_array(strtolower(GetExtension($filename)),$Filter_Array) || in_array(strtolower(GetExtension($filename)),$arr_xl))
     
    Still not possible to upload excel files :(
     
    Error:
    application/vnd.ms-excelee
    File format not allowed! Please contact site administrator.
     
     
    can this be a MIME error?
     
    /Bix
  •  08-27-2010, 12:48 PM 63698 in reply to 63691

    Re: Can not upload excel files

    Dear bix,
    Please use original installation package or undo your previous update, you only need update the security policy file (default security policy file is "cuteeditor_files\Configuration\Security\Default.config"), change:
    <security name="DocumentFilters">
        <item>.txt</item>
        <item>.doc</item>
        <item>.pdf</item>
        <item>.zip</item>
        <item>.rar</item>
        <item>.avi</item>
        <item>.mpg</item>
        <item>.mpeg</item>
        <item>.jpg</item>
        <item>.jpeg</item>
        <item>.gif</item>
        <item>.png</item>
        <item>.htm</item>
      </security>
     
    to:
     
    <security name="DocumentFilters">
        <item>.txt</item>
        <item>.doc</item>
        <item>.pdf</item>
        <item>.zip</item>
        <item>.rar</item>
        <item>.avi</item>
        <item>.mpg</item>
        <item>.mpeg</item>
        <item>.jpg</item>
        <item>.jpeg</item>
        <item>.gif</item>
        <item>.png</item>
        <item>.htm</item>
        <item>.xls</item>
        <item>.xlsx</item>
      </security>
     
    This is the only file you need update. I have tested it on my end. If it still doesn't work, please send your ftp access to [email protected], I will check it for you.
     
    Thanks for asking
  •  08-31-2010, 3:28 AM 63744 in reply to 63698

    Re: Can not upload excel files

    Agree Eric, that was my belief as well, first thing i did after I promised my customer that I have it fixed in no time :)
    anyhow, it turns out that I had to add mimetype (application/vnd.ms-excel) to the extension .xls and .xlsx in the function:
    BuildMimeArray()
    located in CuteEditor_Files/Dialogs/Include_Mimetype.php
     
    Now it runs smoooothly again.
     
    Thanks!
     
    /Bix
  •  09-14-2010, 2:36 PM 64003 in reply to 63744

    Re: Can not upload excel files

    I'm having a similar problem adding support to an old site for docx.
     
    In Include_Mimetype.php, in the BuildMimeArray function, when I set the MIME type for .docx to 
    application/vnd.openxmlformats-officedocument.wordprocessingml.document
     
     I get an error message when uploading the file saying..."
    application/octet-streamapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
    File Format not Allowed..."
    Notice the octet-streamapplication in the error message which is not how I defined the MIME-type.
     
    If I set the MIMEType like so...
    application/octet-streamapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
    ... the error message says...
    application/octet-streamapplication/octet-streamapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
     
    Notice the octet stream-application twice.
     
    I'm using CuteEditor 6.1.
     
    Any ideas?
     
    Mike Lockett
    Software Architect
    Laurie Anderson Design
     
     
  •  09-14-2010, 2:44 PM 64005 in reply to 64003

    Re: Can not upload excel files

    After more research, it seems if the docx file is open in Word, on the client machine; this error comes up; however if the file is not open, it uploads as desired. I'll just let our client know that the file has too be closed due to M$ weirdness (the technical explanation).
View as RSS news feed in XML