Issue on large files

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
nothern
Posts: 5
Joined: Wed Aug 28, 2019 2:52 pm

Issue on large files

Post 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
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Issue on large files

Post 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;
    }
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply