Compressed and Corrupted image issue

While downloading the uploaded image in the Document/Notes module, the image was compressed and sometimes distorted.


Steps to reproduce-

1- Create a document record, fill in the required field
2- Upload JPG image
3- Save the record
4- Downalod the uploaded image

Expected results:
Upload the Image with the original size image

Actual result:

The image was compressed and sometimes distorted


Same issue with the Inbound Email attachment

Thanks

Parents
  • Hi  ,

    Thanks for the response.

    The issue is within 12.0.4 version. The problem was due to include/upload_file.php having a PHP version check greater than 7.4.16 doing 

    stream_filter_register('encodeFilter', EncodeFilter::class);
    stream_filter_register('decodeFilter', DecodeFilter::class);

    in the register function. This was causing the distortion in uploaded iamges in SugarCRM.
  • Yes that rings a bell when I was trying to work out what the problem was on v12 image documents.

    We were about to upgrade to v13 anyway, and Sugar Support were sure that the issue was fixed in v13,

    It turns out they were correct.

    I tried to compare what the v12 code was doing and what the v13 code was doing, but couldn't work out that the problem was or what they did to fix it, and since it works in v13 we didn't need to worry about it.

Reply
  • Yes that rings a bell when I was trying to work out what the problem was on v12 image documents.

    We were about to upgrade to v13 anyway, and Sugar Support were sure that the issue was fixed in v13,

    It turns out they were correct.

    I tried to compare what the v12 code was doing and what the v13 code was doing, but couldn't work out that the problem was or what they did to fix it, and since it works in v13 we didn't need to worry about it.

Children
No Data