Upload files >2MB error 422: Unprocessable Content

Hi all :wink:

I have a problem with uploading files (pdf) into invoices or other places in invoiceninja.
Files smaler 2MB are ok, but not above.

My system runs on ubuntu 24.04, apache2, php8.3.

What i allready tried:
Editing php.ini
memory_limit = 512M
upload_max_filesize = 100M
max_file_uploads = 100
post_max_size = 100M
max_execution_time = 600
max_input_time = 600

Editing apache2 .htaccess

The error loos like this:
422: Unprocessable Content • The given data was invalid.

• The documents.0 failed to upload.

I did not found any solution with google or here.
Hope someone can help :wink:

Thanks

Stefan

Hi,

I suggest setting up a phpinfo page to confirm these limits are in effect.

Hi hillel,

thank you very much!
You helpt me to solve the problem!
For your and maybe other interest:
I am used to have my php.ini in /etc/php/8.3/apache2/php.ini
So i edit this, but this was not the php.ini the webserver used…
The right one was shown in the phpinfo and was in /etc/php/8.3/fpm/php.ini
After i edited this, everything works!

Thank you again :wink:

1 Like

Glad to hear it, thanks for the update!