Change the default upload folder for images to something other than upload and then you can do this and not have to change .htaccess. that is a more secure solution.
How is this done?
I chose image file from another location, but the system automatically copies the image into the upload folder.
Look at the document root for the application. In that folder, there is a file called config.php. You will need to edit the section that has:
āupload_dirā => āupload/ā,
I have changed this to:
āupload_dirā => āincoming/ā,
Create a folder under the document root called incoming and change the ownership and permissions so that the users can upload data into that folder.
Regards,
Vishal.
Well, By some luck i got this to work, Thank you Vishmehra. At first it wouldnāt work but now it does pull up a small icon image in the PDF.
Now, before you mentioned
Is there a way to increase the size of this image? It is constrained into the small icon image and my images are wide by necessity.
This image can be full page width if needed.
Thanks
Hi everybody,
Thanks to you and your comments, Iāve got a solution for everything trought your comments and other blogs:
- Images not shown:
Edit .htaccess file in:
crmhome/.htaccess
comment or delete the line:
#RedirectMatch 403 /+upload
create a .htaccess file in:
crmhome/upload/.htaccess
Into the file allow only image file to be seen:
Order Deny,Allow
Deny from all
<Files ~ ā(?i).(png|jpg|jpeg|bmp)$ā>
allow from all
- Images in PDF Templates too small
Edit the file:
crmhome/modules/AOS_PDF_Templates/templateParser.php
search for this lines:
if ($name === 'aos_products_product_image' && !empty($value)) {
$value = '<img src="' . $value . '"width="200px" height="200px"/>';
}
Change width and height attributes as you wish.
Enjoy.
Iāve to give credit to Will on https://salesagility.com/forum/8-aos-5x/2481-put-big-image-variabel-in-to-pdf and to nelem on https://suitecrm.com/forum/developer-help/1784-upload-folder-not-working#7387
Regards.
David
----------------------------//---------------------------
Hello, @david.bohorquez, It seems that you have knowledge of the images, I am having a bit of confusion about the image/ Photo of USER displayed on PDF-templete, if using suitecrmās DEMO page, the image comes out, but on Shared Hosting it is only text X in red. If possible please help.
-Suitecrm: 7.11.2 *(new install)
-Litespeed server
-PHP 7.1
-Image: try both (png and jpg)
Hi hoasenvang7799,
But, sorry, Iām facing the same issue on my SuiteCRM instance hosted on HostGator, the weird thing is that some images are shown and others not, but, Iāve tried a lot of things with no luck, also Iāve reported this bug with no luck, now Iām not wasting more time on this as Iām migrating to a dedicated server on another Cloud provider.
David.
Thank you ! Well anybody help me ! or any suggest for this case: User Photo do not appear with PDF generator (!) hope someone can see this !
-------------------//---------------------- //
Iām not sure if someone uses Photo at User module and adds it to the quote then created pdf file, as a personal notation. But with my quote presentation it is a great choice. However, after the New Installation (new 1) and upgrade (Upgrade 2), Photo does not appear in the PDF anymore.
** One finding is that the Public folder no longer exists in version 7.11.3 - so copying this folder to a new Installation (new 1) and upgrading (Upgrade 2) will work smoothly again.