Page 1 of 1

Issue with .JPG attach download

Posted: Wed Mar 16, 2022 1:14 pm
by fteixeira
Script URL: HESK
Version of script: 3.2.5
Hosting company: My Server
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

HI. I am testing the HESK. Great sistem. But I have a issue with .JPG attacments. When a ticket is opened and user send a .JPG attachment I can not download the file. The file downloaded is corrupted. The file upload correct, because I can see the .JPG image direct in directory. But download by HESK is corrupte. Are you able to help me?

Thanks

Re: Issue with .JPG attach download

Posted: Wed Mar 16, 2022 1:46 pm
by Klemen
This happens because you edited files and didn't save them correctly - one of them has hidden UTF-8 BOM somewhere.

Convert any Hesk file you opened and edited manually to the correct file format:
https://www.hesk.com/knowledgebase/index.php?article=87

Re: Issue with .JPG attach download

Posted: Thu Mar 17, 2022 4:33 am
by fteixeira
Hi,

Thanks for help. The tips worked. But I did not edited the files. I only downloaded the files from HESK like the user uploaded. Maybe it is HESK bug? Are some thing that I can do to solved it definitive?

Thank you very much. The HESK is great.

Re: Issue with .JPG attach download

Posted: Thu Mar 17, 2022 5:21 am
by fteixeira
Klemem, If possible, make a test here: https://seusitio.com/documentos/index.php?a=add

You can open a ticket with .jpg attatched and then try to download the attachment.

Or, see the issue here: https://seusitio.com/documentos/ticket.php
2UE-13T-QQJ3
teste@teste.com

Sorry to take your time :wink:

Re: Issue with .JPG attach download

Posted: Thu Mar 17, 2022 6:47 am
by Klemen
It's not a Hesk bug, it's an issue in your specific setup.

If you look at your JPEG file in a HEX editor it starts with 0xEF, 0xBB, 0xBF which is the UTF-8 BOM sequence of bytes. This is the reason the JPEG file does not open. Again, this happens when you edit a file in an editor that cannot correctly save UTF-8 files.

Maybe you edited your language file (text.php)? Use Notepad++ to convert it to the correct file format as explained in the article I linked to.

Re: Issue with .JPG attach download

Posted: Thu Mar 17, 2022 3:24 pm
by fteixeira
Klemen wrote: Thu Mar 17, 2022 6:47 am Maybe you edited your language file (text.php)? Use Notepad++ to convert it to the correct file format as explained in the article I linked to.
Great Guy!!! :D

Yes, I edited text.php with windows notepade. Well, I edited again with notepad++ with converting and worked fine. Thank you!!