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
  • We upgraded an on-premise SugarCRM v6 to v12 (and then to v13) last year (I think).

    v6 stored documents in the "/upload" folder. It stored them all using the sugarid of the revsion as the filename. It stored the original file data, but without extension.

    v12.0.2 (I think, but NOT v12.0) changed this to

    (a) add sub-folders whose names are 3 hex digits (0-F) and move files where the last three characters before the first dash match those digits (e.g. a file "83929000-38a5-a125-4412-5720bca4ace6" is moved from /upload/ to /upload/000/) and

    (b) modify the file contents (basically to change the byte sequence "<?php" to a sequence of a different length when uploading a document, and then changing the sequence back when accessing the file; presumably so the files in the upload folder never have the sequence "<?php" so can never be executed as a php file)

    In v13, the upload process CORRUPTED uploaded images: I think the code was supposed to bypass changing the contents for images, but was NOT. I think this got fixed in v13.0.2.

    It sounds like you have a similar issue.

    What version of Sugar are you using? Do you have on-premise or in the cloud?

  • And the other change v12 made was that image files are always processed and the processed version is stored. NOT the original image file which is NOT KEPT. 

    So JPG images are stored MUCH smaller file sizes for photo which can be several megabytes originally.

    The difference is probably not noticable for most people, and presumably no-one has complained to Sugar that uploaded images are blurry etc?

Reply
  • And the other change v12 made was that image files are always processed and the processed version is stored. NOT the original image file which is NOT KEPT. 

    So JPG images are stored MUCH smaller file sizes for photo which can be several megabytes originally.

    The difference is probably not noticable for most people, and presumably no-one has complained to Sugar that uploaded images are blurry etc?

Children
No Data