Want to show product picture

there is a function to upload a picture of a product.
The picture uploads as expected, but the link to the jpg in the upload folder does not work

You do not have permission to access this document.
but all folders have read access.

why is the access to the picture not permitted?

I found on the internet a very old, no longer available, module that adds a new Photo type.
Since it was for an old version of SugarCRM and PHP I have modified it (quite heavily) and now it seems to work but it may have several bugs.

I don’t know If I am allowed to distribute it.

At the moment it also needs a little clean up of the code.

In any case it is now able to upload a picture and display it in edit, list and detail views.
When I uninstalled it from one instance of SuiteCRM, the uninstall was partial so I had to remove certain parts manuallly because the system would crash when performing certain actions.

If you want to try it please let me know.

Hopefully it could be taken care by SalesAgility in order to add it to the standard distribution of SuiteCRM.

Thanks for the offer,
sounds like a lot of work to make this work in a production environment?

I am afraid my set-up is not correct after migrating from sugarCRM CE to SuiteCRM. And one for those symptoms is that I can not see the uploaded picture in products.
May be this function is depreciated?

From my understanding it is available only in the Pro and Enterprise editions of SugarCRM, but I may be wrong.

If you want to try my new field type version the install goes fine, but I recommend that you first try on a test instance.

1 Like

I use SuiteCRM 7.1.1 and have the function in the product tab. The picture uploads, via FTP I can see it in the upload folder, but when I want to access it via SuiteCRM->Product, I get the “You do not have permission to access this document.” Error. The upload folder has 775 permission.

Can you post the code for the module?

Please send me an email (a m a r i u s s i — a t — h o t m a i l — d o t — c o m) with your email adress and I will send it to you. I prefer not to upload it here since I do not know if it is legal since I have modified some old code that I found on github. (it contains the standard SugarCRM licence with reference to the original developer, which I have not modified)

I tried uploading an image with the standard Products field and the image did not display. I checked file permissions and everything seemed fine.

The only thing I noticed was the src folder in the img tag, which, at first sight, seems to point to the very root folder as start folder of the path rather than the SuiteCRM base folder.

I mean this:
it points to /suitecrm/upload/imagename.jpg

instead of: /pathtowebfolder/suitecrm/upload/imagename.jpg

I found in /.htaccess
RedirectMatch 403 /+upload in the main folder,
this might prevent all pictures uploaded in ‘upload’ from distribution.
I guess the product module is missing some code to show pictures using some function.

And i doubt that this worked once, because storing the picture on upload directly will end in a big mess some day.

I overlooked some thing?

Yeah, thank to @rodsales i found that “had an .htaccess file in the upload folder itself too.” delete it or rename over… all return to working ! Take a look Solution here!

https://salesagility.com/forum/8-aos-5x/2627-cannot-see-product-image