Closed etj closed 10 months ago
In a server we got:
geonode=# select * from avatar_avatar where user_id = 1089;
id | primary | avatar | date_uploaded | user_id
----+---------+------------------------------------------------+------------------------------+---------
10 | t | avatars/JohanXXXXXXXXXX/kuva_työhakemukset.jpg | 2022-10-12 09:28:20.74668+00 | 1089
(1 row)
This is how the file looked in the host (ok):
root@geonode-11:/srv/utu-geonode# ll /var/lib/docker/volumes/utugeonode-statics/_data/uploaded/avatars/JohanXXX
total 800
drwxr-xr-x 3 root root 4096 loka 12 2022 ./
drwxr-xr-x 13 root root 4096 helmi 18 12:21 ../
-rw-r--r-- 1 root root 805437 loka 12 2022 kuva_työhakemukset.jpg
drwxr-xr-x 6 root root 4096 loka 12 2022 resized/
root@geonode-11:/srv/utu-geonode#
This is how the file looked in the container (broken):
root@596f4fc93a49:/usr/src/utu_geonode# ll /mnt/volumes/statics/uploaded/avatars/JohanXXX
total 800
drwxr-xr-x 3 root root 4096 Oct 12 2022 ./
drwxr-xr-x 13 root root 4096 Feb 18 10:21 ../
-rw-r--r-- 1 root root 805437 Oct 12 2022 'kuva_ty'$'\303\266''hakemukset.jpg'
drwxr-xr-x 6 root root 4096 Oct 12 2022 resized/
root@596f4fc93a49:/usr/src/utu_geonode#
Within the docker container the locale settings are set this way
and this may cause problems when geonode needs to deal with non-ascii characters (we got errors when an avatar had the jpg file containing a "ö".
We need to set a proper encoding.