Page 1 of 1

Issue on large files

Posted: Wed Mar 22, 2023 10:05 am
by nothern
HESK version: 3.4.2
PHP: 8.1.13
MySQL: 10.6.12-MariaDB
site: https://www.euplink.com/support/

Hi all!

I have an issue with large files upload to Hesk;
When someone upload a large file; the server is handle it; when the customer finished the upload; the server is moving it to the temp folder and it can take some second before the transfert of the file is complet into the temp foder. So for customer the transfer is finish but on the server side; the transfert isn't finished into the temp folder; so when the customer send it's message just after he finish the transfert; the ticket is accepted but there is no file with it and the file stay into the temp folder...

I already tried this:
if (hesk_copy($hesk_settings['temp_server_path'].$old_name, $hesk_settings['server_path'].$new_name)) {
hesk_unlink($hesk_settings['temp_server_path'].$old_name);
}
and change it to
CODE: SELECT ALL

rename($hesk_settings['temp_server_path'].$old_name, $hesk_settings['server_path'].$new_name);

But this has no effect... Can you help me?

PHP settings are OK; large files are accepted if the user wait few second after he finish the upload...

Best regards

Re: Issue on large files

Posted: Wed Mar 22, 2023 1:46 pm
by Klemen
Not sure why the server would take that long to rename a file?

Does it help if you skip (delete) this check in /inc/attachments.inc.php inside function hesk_getTemporaryAttachment

Code: Select all

    if (!file_exists($hesk_settings['server_path'].$row['saved_name'])) {
        // Not deleting the file itself because it, well, doesn't exist.
        hesk_deleteTempAttachment($file_key);
        return null;
    }