planka
planka copied to clipboard
Can't add an image (Attachment or background)
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:
...
ports:
- 3358:1337
environment:
- BASE_URL=https://planka.mydomain.com
...
Redirect by
/etc/nginx/conf.d/planka.mydomain.com.d/redirect.conf
location / {
proxy_pass http://127.0.0.1:3358;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Port $server_port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
In browser console I see this:
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.
I hope that someday I will make a documentation with installation and working configs 🙈
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]
It looks like Authorization header is missing because of the CORS settings 🤔
What if you try to set allowOrigins: '*'
in the server/config/security.js
(just for the test).
Did not help :( At this time we have:
- http://IP:port - can upload images, but I don't see them;
- https://planka.domain.com - I can't upload images, but I see uploaded by IP images
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 :
server {
server_name planka.mydomain.com ;
location / {
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:3202;
}
listen 80; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/planka.mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/planka.mydomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
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.
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?
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.
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
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
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 ?
Isse was related to folder rights. Can be closed