Problem with upload in invoice

FYI - It appears the Dec 15th update breaks the functionality.

If I roll back to the Dec 8th 2024 update it works correctly.

2 Likes

What is the extension of the file that you want to upload?

My attachments are always PDF documents.

Take a look here:

$tempFile = $_FILES['file']['tmp_name'];
        $filePath = $this->get_target_file_path($url_key, $fileName);

        if (!$this->validate_upload($tempFile, $fileName)) {
            return;
        }

        $fileType = mime_content_type($tempFile);
        if (!$this->validate_mime_type($fileType)) {
            return;
        }

All that return gives you absolutely nothing in the log file.

Maybe $tempFile = $_FILES['file']['tmp_name']; is empty or has a weird extension.
Then validate_mime_type fails and exactly nothing gets logged.

If we can’t figure it out before 1.6.3 goes beta, we’ll fall back to the December 8th version of the file.

Hi there, appreciate the project!
Same issue here, after Dec 15th the function Upload.php breaks, and the changes mentioned earlier in this thread don’t solve it.
Just putting the version from December 8th in place does work.
So using this as a workaround for now.

1 Like