I don’t mean to ignore this, I am just replying on my phone and will provide this as soon as I have a PC in front of me.
Complete version info
Gramps 6.0.6
Gramps Web API 3.6.0
Gramps Web Frontend 25.12.0
Gramps QL 0.4.0
Sifts 1.1.1
locale: en
multi-tree: false
task queue: true
OCR: true
chat: false
Current state of “Media file status” in settings
Media file status
555 Media Objects
Error: 29 media objects with missing checksum
Error: 532 media objects with missing file
**
Go to export and export all media files in Gramps Web. Please report how many files the resulting ZIP file contains**
21 files
I uploaded one image file in zip and this is what I get in the log:
grampsweb_celery | [2026-01-26 17:46:37,793: INFO/MainProcess] Task gramps_webapi.api.tasks.import_media_archive[426423f3-e318-4a14-8dbd-6026d0b41b05] received
grampsweb_celery | [2026-01-26 17:46:37,992: INFO/ForkPoolWorker-1] Task gramps_webapi.api.tasks.import_media_archive[426423f3-e318-4a14-8dbd-6026d0b41b05] succeeded in 0.19725401792675257s: {‘missing’: 493, ‘uploaded’: 1, ‘failures’: 0}
It looks like it works, but the image does not show up on the corresponding media object, and a new export of media files still shows only 21 images.
Interesting. The numbers don’t quite add up: 555 - 532 = 23. Perhaps there are some media objects which point to the same file?
In any case, it looks like there are hundres of files with checksum but without file. Let’s try with a larger ZIP, and then after it shows in the log that N files were successfully uploaded, please docker compose exec grampsweb bash and docker compose exec grampsweb_celery bash and check whether the files are present in the media folder.
@DavidMStraub :
There shouldn’t be any media objects that point to the same file, but that doesn’t mean that there aren’t.
The files with the checksum but no file are a problem. I cannot go into the media object record and replace the file through the edit menu, as it tells me that the file I am replacing it with has the same checksum. Otherwise, I would have just manually replaced the files one by one and moved on. The zip upload seems my only option.
I uploaded a zip of 14 items, about 17Mb.
grampsweb_celery | [2026-01-26 18:50:01,478: INFO/MainProcess] Task gramps_webapi.api.tasks.import_media_archive[4c6ecc3b-5139-4234-865f-8c68b6c6f20d] received
grampsweb_celery | [2026-01-26 18:50:01,855: INFO/ForkPoolWorker-1] Task gramps_webapi.api.tasks.import_media_archive[4c6ecc3b-5139-4234-865f-8c68b6c6f20d] succeeded in 0.3757279668934643s: {‘missing’: 493, ‘uploaded’: 14, ‘failures’: 0}
root@gramps:/opt/grampsweb#
The new files are not there in /app/media/. It’s the same list of files from before. Is there another location that they could be uploaded to?
Interesting. You can see from the source code
that this only happens when the file already exists..
For one specific example file where this happens, can you please check the API response in the dev console (F12, network tab) and check the “path” property of the media object? I bet it’s an absolute path.
Or perhaps a path with Windows backslashes?
I’m not sure I know exactly how to look for that, but I think this is what you’re asking for:
The path looks like this:
/api/media/d386b58a97a72667315/cropped/13/4/90/72/thumbnail/300?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc2OTQ1ODcxMiwianRpIjoiOTA0Y2U4NjgtMjA3YS00Y2VmLTllN2QtNWUxZjE5ZTUwN2YxIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjdlZGZkNzViLTM1MTMtNDYyYy1iZWZiLTM5ZmU5N2Q5YThjYiIsIm5iZiI6MTc2OTQ1ODcxMiwiY3NyZiI6ImU1ZDE5MWJjLWI5MGYtNDE5Mi1iOGQyLTIzYzM2MTc0MzllYSIsImV4cCI6MTc2OTQ1OTYxMiwicGVybWlzc2lvbnMiOlsiVmlld090aGVyVXNlciIsIkRlbGV0ZU9iamVjdCIsIkVkaXRUcmVlTWluUm9sZUFJIiwiRWRpdE5hbWVHcm91cCIsIkVkaXRPdGhlclRyZWUiLCJWaWV3T3RoZXJUcmVlVXNlciIsIlRyaWdnZXJSZWluZGV4IiwiRWRpdFRyZWVRdW90YSIsIkVkaXRUcmVlIiwiVmlld1ByaXZhdGUiLCJEZWxldGVPdGhlclRyZWVVc2VyIiwiQWRkVHJlZSIsIkRpc2FibGVUcmVlIiwiQWRkVXNlciIsIkJhdGNoRGVsZXRlT2JqZWN0cyIsIlZpZXdTZXR0aW5ncyIsIlJlcGFpclRyZWUiLCJFZGl0T3RoZXJUcmVlVXNlclJvbGUiLCJFZGl0T2JqZWN0IiwiRWRpdFVzZXJUcmVlIiwiTWFrZUFkbWluIiwiVmlld090aGVyVHJlZSIsIlVwZ3JhZGVTY2hlbWEiLCJFZGl0T3duVXNlciIsIkRlbGV0ZVVzZXIiLCJJbXBvcnRGaWxlIiwiRWRpdE90aGVyVXNlciIsIkVkaXRPdGhlclRyZWVVc2VyIiwiRWRpdFVzZXJSb2xlIiwiQWRkT2JqZWN0IiwiRWRpdFNldHRpbmdzIiwiQWRkT3RoZXJUcmVlVXNlciJdLCJ0cmVlIjoiNDcyNTljYzYtYjA2YS00ZWU1LThkNGEtYTQ2MjM4OWViODY2In0.Regvp07gPopOOmz_3PWl3ChF-4i9qclziODIszaH3RU&square=false
It comes with a lot of errors like:
{“error”: {“code”: 403, “message”: “File access not allowed”}}
What I don’t see is a straight link to a .jpg or another recognizable image file.
Also this:
<svg width="200" height="200" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" rx="0" ry="0" fill-opacity=".1" fill="#000"/>
<path d="m18.88 6.6488v5.0377l-2.2934-2.301-3.0578 3.0655-3.0578-3.0578-3.0578 3.0578-2.2934-2.301v-3.5012a1.5289 1.5289 0 0 1 1.5289-1.5289h10.702a1.5289 1.5289 0 0 1 1.5289 1.5289m-2.2934 4.9078 2.2934 2.301v3.4935a1.5289 1.5289 0 0 1-1.5289 1.5289h-10.702a1.5289 1.5289 0 0 1-1.5289-1.5289v-5.0301l2.2934 2.2857 3.0578-3.0578 3.0578 3.0578" fill-opacity=".25" fill="#000"/>
</svg>
@DavidMStraub Is this the path information you are looking for? What do you think?
No, it’s the media path in your Gramps Web database. Go to the media detail view and then look in the browser network tab, the API call for /api/media/?gramps_id=... and in the response look for the path key:
Got it. It returns: “path”: “../../images/Kent Woynowski/Ada LaVerne Henry 2015.jpeg”
Ok.
It’s a relative path (good), but it’s outside the media directory (two levels up). This is forbidden in Gramps Web, otherwise you could just put ../../../etc/passwd or something like that.
So, you’ll have to move all media files into the media directory and have relative paths that do not start with ...
We should make this clear in the docs.
@DavidMStraub Thank you!!!
So how do I fix this? Do I move them in my desktop Gramps app and re-export?
Or upload the files to the Gramps Web and edit the media path somehow?
Do you use the sync addon? If yes, sync, then move the files on your computer and make sure the media path in Gramps dekstop is updated. Then, sync again.
@DavidMStraub I don’t use that. I will investigate and try it out. Hopefully the next time you hear from me, it’s an update that everything is working out.
I really appreciate your patience and attention in helping me with this! Thank you!
@DavidMStraub It’s working!
It doesn’t seem that Sync likes to upload folders, so I’ve done some manual uploads and most everything is appearing on Gramps Web. Thanks for all your help!
Great!
Just out of curiosity, can you check whether you’re using version 1.3.6 of the sync addon? It contained a fix related to folder creation.
I am using 1.3.6.
it created files that had names like “images/census/US_1840.jpg” instead of an images folder with a census folder inside of it.
Once I manually uploaded the folder structure, the images worked. Sync does tell me that I there are many images that need to be uploaded, though.
