File Upload

Help
2008-07-18
2013-05-28
  • Knut Krüger

    Knut Krüger - 2008-07-18

    Hi Matthias,
    I have still (it never worked but i did not need it) problems with the file upload.
    I see the data transfer in the DSL monitor, but I do not find the file.
    I am able to use the file if I copy the file into the files director by ftp.
    Normal PHP file upload is working, so the default php temp directory should be valid.

    Regards Knut

     
    • Matthias Steffens

      Hi Knut,

      can you verify that a temp file is created within your server's temp directory after you've uploaded a file via the refbase upload form?

      Please double check the permissions of your refbase files directory, i.e. make sure that Apache/PHP is allowed to copy a file from the temp directory to the refbase files directory.

      You're using the refbase version from the SVN repository, right? (latest trunk or bleeding-edge version)

      It may be worth checking your servers error_log if it says anything. Also, you might want to debug the refbase 'modify.php' script by inserting print & exit commands around the line that calls the 'move_uploaded_file()' function. You could use:

      echo "temp file path: " . $tmpFilePath . "\n";
      echo "dest file path: " . $destFilePath;
      exit;

      or something like that.

      HTH, Matthias

       
      • Knut Krüger

        Knut Krüger - 2008-07-18

        ->It may be worth checking your servers error_log if it says anything. Also, you might want to debug the refbase 'modify.php' script by ->inserting print & exit commands around the line that calls the 'move_uploaded_file()' function. You could use:

        echo "temp file path: " . $tmpFilePath . "\n";
        echo "dest file path: " . $destFilePath;
        exit;

        // (IMPORTANT: if given, the base dir MUST end with a slash!)
        Destination path did not end with a slash ....

        maybe I will change my editor to mark the word IMPORTANT red and blinking ...

        Thank you
        Knut

         
        • Matthias Steffens

          > Destination path did not end with a slash

          I'm glad you could resolve your issue.

          So, in case this is of interest to others, one needs to make sure that the file path given in variable '$filesBaseDir' (in file 'initialize/ini.inc.php') ends with a slash.

          Also, if others run into upload problems, and you're using refbase-0.9.0, please checkout this help section in our wiki:

          http://wiki.refbase.net/index.php/Installation-Troubleshooting?#Upload_of_files_results_in_error_message

          Matthias

           
      • Knut Krüger

        Knut Krüger - 2008-07-18

        Is there any function to delete the uploaded files again and empty the File field?

        Regards Knut

         
        • Matthias Steffens

          > Is there any function to delete the uploaded files again
          > and empty the File field?

          The refbase admin can freely edit the 'file' field, so he can remove (or change) any file path given there.

          However, currently the refbase web interface doesn't offer to entirely remove uploaded files from the server. When deleting a record, refbase does not delete the associated PDF file since it may be also used elsewhere. Also, the record might have been deleted inadvertently, and data recovery is easier if the file is still there. That said, a smarter way of handling file removal would be desirable. OTOH, there weren't (m)any complaints over the last few years...

          Matthias

           

Log in to post a comment.