Attachment size


I’m just getting into using Vikunja, it looks good and very promising!
I tried adding an attachment (picture with camera)to a task with my mobile, but I guess the default size of my pictures is too big, because I get a 413 error in the Vikunja logs.(docker install)
Is there any way to config the accepted size? I could not find it in the Docs.

Thank you very much!

client intended to send too large body: 2697191 bytes
“PUT /api/v1/tasks/2/attachments HTTP/1.1” 413 585

The default size is 20MB which you can change in the config (search for “filesize”). However, this should be enough to save a 2.5MB image (~2697191 bytes) so it seems the error lies elsewhere.

How did you install Vikunja? What version are you using? Are you using a reverse proxy with different limits?
Where did you found that error message? Vikunja by itself does not return a 413 within its application logic by itself, it could be that some part of the web framework does though.

Thank you for your reply. I used this docker example. I did not change anything in the docker-compose.yml except the port number from the proxy and volume locations on my host.The logging came from the frontend docker. When i’m home I will look for the config.yml in the docker image and see what it does.

Thanks again!

Do you have another host proxy to resolve the domain or such?

You can also verify the size from the /api/v1/info endpoint on your installation.

You probably don’t have a config.yml since the configuration is happening through the environment variables from the example, if you did not create a seperate config file.

/api/v1/info gave me:


However, I had to add client_max_body_size 20M; to the nginx.conf of the nginx image (added it to the docker-compose.yml), because the standard max size is 1MB.

Other than that I changed some environment settings in the docker-compose.yml. I added my PUID and GUID to the api service and changed the permissions of the files folder to my user, otherwise I would get a permission denied when adding an attachment.)

Now everything is working fine! Thanks again!

1 Like

Glad you got it to work! Would you be up for a pr to change the docs about this?

I’ve just pushed a change to the docs to mention client_max_body_size.