Hi,
I did a fresh install on my local machine using docker :
- Download the 14.0.0-A3 tag from github
- Execute composer to download the plugins
- Perform a docker compose up
- Do the install from the web UI
Everything runs soomthly except... images do not upload !
I can upload a picture for my avatar and retrieve it using a URL like this : http : //localhost/s/bx_persons_pictures/sc6rxpgsiibve3v9mzmd6tgefrskprun.jpg
But when I switch page, the picture disappears, it cannot retrieve the URL which is now transcoded : http : //localhost/image_transcoder.php?o=bx_persons_avatar_big&h=7&dpx=1&t=1715084650
The transcoder.php script returns a 404. Going into the code, it seems the isFileReady() method returns false, I don't understand why...
I ran the audit which is fine, storage folder is writable and contains the images. ffmeg is version 4.4. /etc/hosts has the line "127.0.0.1 localhost"
This is driving me crazy, I don't understand how a fresch install can not work on such a basic feature. Am I missing something ?
Thanks a lot in advance!
- 494
C
I found the solution, here it is for the benefits of this great community.
When getting the image, una goes through the transcoder. In docker, this is done inside the 'php' container.
From within this container, it performs a call to a url that looks like http: //localhost/s/bx_persons_pictures/sc6rxpgsiibve3v9mzmd6tgefrskprun.jpg in order to fetch the image and resize it.
But from within the container, the hostname is lost (here it is localhost, it can be my-una-website or whatever). So the resize call fails, the resized picture is not resized nor stored in the DB. The avatar picture is not found, and not displayed.
In order to fix that, you need to specify the hostname to your the 'php'. This is done by a simple 'hosname' line in the docker-compose.yml:
so do you add hostname in web, cron or php service or in all the services from docker-compose.yaml?
C
Just in the web service