Announcement

Collapse
No announcement yet.

Upload document filename

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload document filename

    Is there a fix to filenames that have '&' character in them? When I upload pdf files with '&', they upload correctly and the filename is indicated correctly, but when it is downloaded an error occurs reading the filename. It is not possible to change my filename structure. Any suggestions would be appreciated.

  • #2
    This is a tricky one. First you say you want to correct filenames which is possible. Then you want to leave the filename intact??
    Anyway you can check the generated code and find out where the error occurs. Likely this is a bug, I fond various bugs in the file uploeader in V6 which were never fixed. So I am not surprised
    if this is a bug in v7 as well..
    Anyway you can change the filename on the OnAfterInsert or better yet on the OnBeforeInsert.
    You need to check the generated code to see what you exactly need.
    For example in v6 the following $_SESSION['scriptcase']['grid_fileupload']['glo_nm_path_doc'].[sc_upload_folder].{FILENAME} goes for an application grid_fileupload with a subfolder called sc_upload_folder

    This long $_SESSION... I derived from the generated grid_fileupload.php file. This is the main php used to start the application. V7 probably has a similar structure (hopefully w

    Comment


    • #3
      Thanks for your comments. As an example, I upload a file "P&ID 001.pdf". There are no issues here and the filename displays properly in the database. I have also confirmed the database is storing the blob data correctly. However, when I try to download this file in the SC grid application, I get a browser error that says "The file does not exist: P**Ecom**ID 001.pdf". So it appears the "&" is being converted to "**Ecom**". This appears to be strictly an issue with "&" characters. I have no issues with files not containing this character. I'm guessing this is a bug but I can't find anyone else having this issue.

      Comment


      • #4
        It probabely is a bug. My personal experiences with html special chars is that they always give trouble somewhere. If it's a & or @ or ? You always have to take special care. I think I would try to avoid it by replacing these by other chars, but you probabely are already considering this.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          Hello,

          Issue reported to our bugs team.

          Are you saving this file to your server (doc - file name), or your db (document - database)?

          regards,
          Bernhard Bernsmann

          Comment


          • #6
            Thank you for the feedback. I am saving the file to database.

            Comment

            Working...
            X