File upload saves corrupted files (0KB)

Last post 07-26-2010, 12:30 PM by rkw-edv. 2 replies.
Sort Posts: Previous Next
  •  07-24-2010, 10:04 AM 62689

    File upload saves corrupted files (0KB)

    I'm still working with version 4.2. Now i've to enable file uploads (e.g. for pdfs) There is no option to enable pdf upload, so i've changed the filepost.asp like this:

    Function ValidFileName(str_FileName)
     Set RegularExpressionObject = New RegExp

     With RegularExpressionObject
      .Pattern = "^\w+\.(gif|jpg|jpeg|png|pdf|txt)$"

    .
     
    Before this change, I always got the error message: file name not supported! After this the upload works fine, but all files are corrupted. The file size is 0Kb and the files can't be displayed. Do you have a solution for this (old) problem? Thanks for your help! Ralph
  •  07-25-2010, 12:46 PM 62700 in reply to 62689

    Re: File upload saves corrupted files (0KB)

    Can you find the default security policy file in your installation? Its path should be "\cuteeditor_files\Configuration\Security\Default.config", please add "pdf" to related file type list and test it again. You can refer to http://cutesoft.net/asp/document/scr/Restricting-Document-Files-by-Extensions-and-Types.htm
     
    Keep us known.
     
    Regards,
    Eric
     
  •  07-26-2010, 12:30 PM 62716 in reply to 62700

    Re: File upload saves corrupted files (0KB)

    Hi Eric,
     
    no, in my version there is no such subdirectory like this. Only the folders (Help, Images, Languages, Templates and Themes are aviable. Remind I have Version 4.2!
     
    After my change, any files (inklude Images) that are uploaded are corrupted (0Kb).
     
    I have withdrawn the change to the file, but the upload doesn't work!
View as RSS news feed in XML