Image not showing in PDF

karen

Member
Hi, I have uploaded an image to a record - it shows fine on the details page, but does not show on the pdf, just a blank space where it should be.
I have added the server ip address to the .htaccess file in upload as allowed, but still does not make a difference. I am using the default template.
 

karen

Member
Hi Eugenio, thanks for the reply. I checked out the thread, and I disabled authentication, but still the same. I made a new template using your example, and the line for the image field is

<tr><td>Image </td><td>dadabik_field image dadabik_field</td></tr>

This results in a large blank space on the pdf that looks like it's where the image should be.

(The image for the logo at the top with the code <img src="images/logo.png"> shows perfectly well on the pdf)

Thanks in advance.. and PS thanks for a fantastic application, loving discovering it's possibilities.. this is my first headache!
 

eugenio

Administrator
Staff member
Hello Karen,
thanks for the appreciation!
Apart from disabling the authentication, have you tried the other suggestions in the forum post (remove/set $site_url/$site_path)?
If the other image (for which you specified the path) appears, it seems a path problem.

Best,
 

karen

Member
Hi thanks Eugenio - I have tried various combinations of having the site url and path set/not set, this is what I have currently: (I've tried putting the upload_directory in the same format as I have upload_import with the full path, but didn't work. Dadabik is installed in root of subdomain and can be accessed from https://subdomain.websitename.co.uk

$upload_directory = 'uploads/';

$upload_import_directory = '/var/www/vhosts/websitename.co.uk/subdomain.websitename.co.uk /uploads_import/';

$site_url = 'https://subdomain.websitename.co.uk/';

$site_path = '/';
 

eugenio

Administrator
Staff member
Hello,
the first thing you should try is to leave $site_url and $site_path empty, 99% of the times they don't need to be set.
$upload_directory must be a full path so for sure 'uploads/'; is not correct.
If you just want to leave, as upload directly, the default one "uploads", you should leave:
$upload_directory = '';
this is not a good option for security reasons, but that's another story.

$upload_import_directory does not have any impact on this.

Finally, the old post also mentions $upload_relative_url, which is a parameter that is not used anymore.

Best,
 

karen

Member
Hi, thank you for the quick response.
I have changed site url, path and upload directory to empty, but still the same result.

Regarding the security issue, as this is an internal app, I have set the .htaccess file only to allow connections from our business fixed IP address and our Cloud VPS IP address, so cannot be accessed from outside - I am wondering now if this is causing an issue?
I have just tried to access https://subdomain.websitename.co.uk/uploads from work ip and received a 403 forbidden error?

.htaccess file is configured the same in the subdomain root, uploads and uploads import folder as:

order deny,allow
deny from all
allow from xx.xx.xx.0
allow from xx.xx.xx.154
 

karen

Member
😁
😁
Hi Eugenio, please forget everything above.. not sure how, but I've just logged in and out again and the pictures are now showing!
Thanks a lot for your help, much appreciated. 👏👏
 
Top