mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
Can't add an image (Attachment or background) #225
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FreeSst on GitHub (Sep 1, 2022).
When I try to add an image it redirects me to the login page.
Planka installed with Docker Compose through Portainer. Changes in yml only here:
Redirect by
In browser console I see this:
@FreeSst commented on GitHub (Sep 2, 2022):
Seems that this is the same problem as described here:
https://github.com/plankanban/planka/issues/189
If I use IP without https all works
BASE_URL=http://serverip:3358
Workaround for Apache is described there. But all my experiments with Nginx have had no luck.
@meltyshev commented on GitHub (Sep 2, 2022):
I hope that someday I will make a documentation with installation and working configs 🙈
@FreeSst commented on GitHub (Sep 3, 2022):
After a while, changed a lot of options in configs and spent a lot of time.
I have uploaded some images when connected by IP. After I changed setting to a domain, and I can see the uploaded images. But I can't upload it through the domain at all.
Error:
POST https://planka.mydomain.com/api/projects/795141969448797479/background-image [HTTP/2 401 Unauthorized 299ms]@meltyshev commented on GitHub (Sep 3, 2022):
It looks like Authorization header is missing because of the CORS settings 🤔
What if you try to set
allowOrigins: '*'in theserver/config/security.js(just for the test).@FreeSst commented on GitHub (Sep 4, 2022):
Did not help :(
At this time we have:
@gr0vity-dev commented on GitHub (Sep 16, 2022):
I had a similar problem that attachments would not load. (However my real issue was that I had a traling / in my base Url and images could not be found under //attachements)
This is my nginx config that works for me :
@Giorgio-Germani commented on GitHub (Mar 3, 2023):
It would be great if someone could write a configuration for Nginx Proxy Manager. Everything besides the image upload works. I don't what the issue is.
The circle just keeps going whenever i try to upload something.

@daniel-hiller commented on GitHub (Mar 3, 2023):
Hi,
the config should work fine.
We are using the same and and it solved the problem from another user.
Originally posted by @daniel-hiller in https://github.com/plankanban/planka/issues/399#issuecomment-1437022605
Do you use docker volumes or hostpath mounts?
@Giorgio-Germani commented on GitHub (Mar 3, 2023):
I'm using volumes. We didnt make any changes to the standard configurtion:
volumes:
user-avatars:
project-background-images:
attachments:
db-data:
oh, user avatars are working. Thats what i find most surpising.
I checked the location and actually saw the uploaded files there:

i honestly don't know what going on.
@daurpam commented on GitHub (Oct 8, 2023):
I've had the same problem. I don't use volumes but mountpoint, The problem was the owner of the directories of attached volumes. The owner was "root", when I've changed to "1000", images and files were uploaded. The command used:
chown 1000:1000 attachments avatars images@Tsunami2056 commented on GitHub (Nov 12, 2023):
I have to say this solved it for me too, it was a permissions issue on the path I was using for a volume (bind mounted).
However I'm not sure the above users are encountering the same problem as their instance did create the subfolders ?
@Giorgio-Germani commented on GitHub (Nov 13, 2023):
Isse was related to folder rights. Can be closed
@bjj commented on GitHub (Feb 17, 2025):
I found this when hitting a similar issue. I am causing myself headaches by not giving the container UID 1000. I had already discovered that
/app/logshas to be bind-mounted in that case (since running with a user remapping means planka image can't write on its on/appdir). Turns out when uploading attachments it needs/app/.tmpas well. So I bind mounted a tmp folder and that fixed it.@amphyvi commented on GitHub (Sep 9, 2025):
I was able to solve it as well by creating the necessary folders to store the relevant data being uploaded, details here https://github.com/plankanban/planka/issues/852#issuecomment-3272078920