Increase upload limit, tried every solution available, please help

hey thanks, my first time using slack so i did not recognize, also thanks for helping.

1 Like

Ok here is how to fix this,
Also, this 20MB limit is hard coded into the self-hosted invoice-ninja-app,
I had to go to their slack channel to get this fix, they were very helpful there, but why this is not documented is beyond me. Anyways here’s the fix:
This is for docker if you not running on docker the steps need to account for it:

  • copy the “Requests.php” file out for editing:
docker cp invoiceninja-app-1:/var/www/app/app/Http/Requests/Request.php /path/to/somewhere/
  • edit the file and change the max:20000 to max:<value>
protected $file_validation = 'sometimes|file|mimes:png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx,webp|max:20000';

to

protected $file_validation = 'sometimes|file|mimes:png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx,webp|max:100000';
  • copy the “Requests.php” file back to its original location:
docker cp /path/to/somewhere/Request.php invoiceninja-app-1:/var/www/app/app/Http/Requests/

try uploading a file now and it should work.

Remember: you also may need to also set the

  • in “php.ini” under docker container “/usr/local/etc/php”:

post_max_size = 100M
upload_max_filesize = 100M
memory_limit = 256M
max_execution_time = 300
max_input_time = 600

  • in “in-vhost.conf” under “invoiceninja/config/nginx”:

client_max_body_size 100M;

Note: “post_max_size” should always be bigger than “upload_max_filesize” and “memory_limit” should always be bigger than both of them.
So, “memory_limit” > “post_max_size” > “upload_max_filesize”

Finally: reload the cache for your website
yourdomain.com is available for purchase - Sedo.com<UPDATE_SECRET you have in your env file>

2 Likes

this is my current docker-compose.yml

version: '3.7'

services:
  server:
    image: nginx
    restart: always
    env_file: env
    volumes:
      # Vhost configuration
      #- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
      - ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
      - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:rw,delegated
      - ./docker/app/public:/var/www/app/public:ro
    depends_on:
      - app
    # Run webserver nginx on port 80
    # Feel free to modify depending what port is already occupied
    ports:
      - "26780:80"
      #- "443:443"
    networks:
      - invoiceninja
    extra_hosts:
      #- "page.domain.org:192.168.100.215" #host and ip
      - "in5.localhost:192.168.0.124 " #host and ip

  app:
    image: invoiceninja/invoiceninja:5
    env_file: env
    restart: always
    volumes:
      - ./config/hosts:/etc/hosts:ro
      - ./docker/app/public:/var/www/app/public:rw,delegated
      - ./docker/app/storage:/var/www/app/storage:rw,delegated
      - ./config/nginx/php/php.ini:/usr/local/etc/php/php.ini:rw,delegated
      - ./config/nginx/php/conf.d/in-php.ini:/usr/local/etc/php/conf.d/in-php.ini:rw,delegated
    depends_on:
      - db
    networks:
      - invoiceninja
    extra_hosts:
      #- "page.domain.org:192.168.100.215" #host and ip
      - "in5.localhost:192.168.0.124 " #host and ip

  db:
    image: mysql:8
#    When running on ARM64 use MariaDB instead of MySQL
#    image: mariadb:10.4
#    For auto DB backups comment out image and use the build block below
#    build:
#      context: ./config/mysql
    ports:
      - "3305:3306"
    restart: always
    env_file: env
    volumes:
      - ./docker/mysql/data:/var/lib/mysql:rw,delegated

      # remove comments for next 4 lines if you want auto sql backups
      #- ./docker/mysql/bak:/backups:rw
      #- ./config/mysql/backup-script:/etc/cron.daily/daily:ro
      #- ./config/mysql/backup-script:/etc/cron.weekly/weekly:ro
      #- ./config/mysql/backup-script:/etc/cron.monthly/monthly:ro
    networks:
      - invoiceninja
    extra_hosts:
      #- "page.domain.org:192.168.100.215" #host and ip
      - "in5.localhost:192.168.0.124 " #host and ip

  # THIS IS ONLY A VALID CONFIGURATION FOR IN 4. DO NOT USE FOR IN 5.
  # cron:
  #   image: invoiceninja/invoiceninja:alpine-4
  #   volumes:
      # - ./docker/app/public:/var/www/app/public:rw,delegated
      # - ./docker/app/storage:/var/www/app/storage:rw,delegated
      # - ./docker/app/public/logo:/var/www/app/public/logo:rw,delegated
  #   entrypoint: |
  #     /bin/sh -c 'sh -s <<EOF
  #     trap "break;exit" SIGHUP SIGINT SIGTERM
  #     sleep 300s
  #     while /bin/true; do
  #       ./artisan ninja:send-invoices
  #       ./artisan ninja:send-reminders
  #       sleep 1d
  #     done
  #     EOF'
  #   networks:
  #     - invoiceninja
  #

networks:
  invoiceninja:

this will put the following files:
nginx.conf
in-vhost.conf
php.ini
in-php.ini
into the “.\config\nginx” folder where you are running the docker-compose.yml from for easy editing.

this is my current “in-php.ini”

; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2
opcache.revalidate_freq=60

# http://symfony.com/doc/current/performance.html
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; http://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120                                                                                                                        
realpath_cache_ttl = 600

; Maximum allowed size for uploaded files.                                                                                                                      
; http://php.net/upload-max-filesize                                                                                                                            
memory_limit = 256M
post_max_size = 48M
upload_max_filesize = 32M
max_execution_time = 300
max_input_time = 600

the “post_max_size”, “upload_max_filesize” and “memory_limit”
all get applied successfully

this is my “env” file:

# IN application vars
# hash in front means that line is skipped
APP_URL=https://page.domain.org
APP_KEY=base64:somelonghashkey
APP_DEBUG=false
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
TRUSTED_PROXIES='*'


QUEUE_CONNECTION=database

# DB connection
DB_HOST=db
DB_PORT=3306
DB_DATABASE=ninja
DB_USERNAME=someusername
DB_PASSWORD=somepassword

# Create initial user
# Default to these values if empty
# IN_USER_EMAIL=admin@example.com
# IN_PASSWORD=changeme!
IN_USER_EMAIL=email@gmail.com
IN_PASSWORD=yourpassword

# Mail options
MAIL_EHLO_DOMAIN="page.domain.org"
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME="email@gmail.com"
MAIL_PASSWORD="google app password if using gmail"
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="email@gmail.com"
MAIL_FROM_NAME="company name"

# MySQL
MYSQL_ROOT_PASSWORD=databasepassword
MYSQL_USER=ninja
MYSQL_PASSWORD=someusername
MYSQL_DATABASE=somepassword

# V4 env vars
# DB_STRICT=false
# APP_CIPHER=AES-256-CBC

# https://yourdomain.com/update?secret=refreshin
# https://page.domain.org/update?secret=secretrefreshcache
UPDATE_SECRET=secretrefreshcache

# Logo not appearing in the PDF, this will embed the image in the PDF rather than request it over the network.
# LOCAL_DOWNLOAD=true
1 Like

@hillel
do you know if this still a thing about hard-coded file size limits?
I can’t get 15mb file uploaded, getting

Error: please check that Invoice Ninja v5 is installed on the server URL: https://REDUCTED/api/v1/projects/4openRe7Az/upload? Response: { "message": "" } Headers: {alt-svc: h3=":443"; ma=2592000, cache-control: no-cache, private, content-length: 21, content-type: application/json, date: Mon, 19 Feb 2024 16:18:30 GMT, server: Caddy, status: 413 Content Too Large, x-powered-by: PHP/8.2.16, x-robots-tag: noindex}}

Increased limits in Caddy config, but it didn’t help.

You’ll see that error if the app version header is missing in the response.

You may want to try with the React app.

Posted below before seeing what you replied. WIll try react.

Seems like file limit was increased in Request.php

protected $file_validation = 'sometimes|file|mimes:png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx,webp,xml,zip,csv,ods,odt,odp|max:100000';

But the php.ini wasn’t

post_max_size = 8M
upload_max_filesize = 2M

What is the proper way to increase the limits? Seems like there is no env variable for this.

In React I just get
image

and nothing in logs

I’ve tried uploading 5mb and 9mb files.

5Mb went through no problem.

9Mb didn’t go through with the same error. Points to post_max_size = 8Mb.

Seems likely, you may want to setup a phpinfo page to check.

I’ve updated settings in php.ini (coudn’t figure out how to run the phpinfo page in 5min that I had for this).
How I did it described here -

Now I’m getting error:
image

Update - nothing about this in the debug logs - storage/logs/invoiceninja.log or laravel.log

This is the console log when I try to upload with edited php.ini (increased file size limits)

Summary
 POST https://REDUCTED/api/v1/projects/VWPe9rxaLy/upload? 422 (Unprocessable Content)
j3 @ main.foss.dart.js?v=5.8.29:107253
ff0 @ main.foss.dart.js?v=5.8.29:352
(anonymous) @ main.foss.dart.js?v=5.8.29:186700
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
$1 @ main.foss.dart.js?v=5.8.29:102212
eiI @ main.foss.dart.js?v=5.8.29:7019
(anonymous) @ main.foss.dart.js?v=5.8.29:343847
Hh @ main.foss.dart.js?v=5.8.29:103353
$0 @ main.foss.dart.js?v=5.8.29:102654
aol @ main.foss.dart.js?v=5.8.29:6883
Cb @ main.foss.dart.js?v=5.8.29:102579
$0 @ main.foss.dart.js?v=5.8.29:102624
eiG @ main.foss.dart.js?v=5.8.29:7016
(anonymous) @ main.foss.dart.js?v=5.8.29:343846
Hf @ main.foss.dart.js?v=5.8.29:103351
Hg @ main.foss.dart.js?v=5.8.29:103326
$0 @ main.foss.dart.js?v=5.8.29:103403
h7J @ main.foss.dart.js?v=5.8.29:6915
hdA @ main.foss.dart.js?v=5.8.29:6917
$1 @ main.foss.dart.js?v=5.8.29:102157
childList (async)
$1 @ main.foss.dart.js?v=5.8.29:102164
fqi @ main.foss.dart.js?v=5.8.29:6922
eiJ @ main.foss.dart.js?v=5.8.29:7037
El @ main.foss.dart.js?v=5.8.29:103369
alC @ main.foss.dart.js?v=5.8.29:102586
t0 @ main.foss.dart.js?v=5.8.29:102584
el @ main.foss.dart.js?v=5.8.29:6787
c5 @ main.foss.dart.js?v=5.8.29:342767
fp5 @ main.foss.dart.js?v=5.8.29:6986
$1 @ main.foss.dart.js?v=5.8.29:102773
$1 @ main.foss.dart.js?v=5.8.29:342792
eiI @ main.foss.dart.js?v=5.8.29:7022
(anonymous) @ main.foss.dart.js?v=5.8.29:343847
Hh @ main.foss.dart.js?v=5.8.29:103353
Hi @ main.foss.dart.js?v=5.8.29:103330
$1 @ main.foss.dart.js?v=5.8.29:103406
fQ4 @ main.foss.dart.js?v=5.8.29:5312
fho @ main.foss.dart.js?v=5.8.29:8182
fZy @ main.foss.dart.js?v=5.8.29:9936
(anonymous) @ main.foss.dart.js?v=5.8.29:9932
FileReader (async)
(anonymous) @ main.foss.dart.js?v=5.8.29:118457
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
aZ_ @ main.foss.dart.js?v=5.8.29:118468
TW @ main.foss.dart.js?v=5.8.29:118453
(anonymous) @ main.foss.dart.js?v=5.8.29:5491
eiI @ main.foss.dart.js?v=5.8.29:7019
(anonymous) @ main.foss.dart.js?v=5.8.29:343847
Hh @ main.foss.dart.js?v=5.8.29:103353
$0 @ main.foss.dart.js?v=5.8.29:102654
aol @ main.foss.dart.js?v=5.8.29:6883
Cb @ main.foss.dart.js?v=5.8.29:102579
ao @ main.foss.dart.js?v=5.8.29:102202
P @ main.foss.dart.js?v=5.8.29:6730
(anonymous) @ main.foss.dart.js?v=5.8.29:118427
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
$1 @ main.foss.dart.js?v=5.8.29:102212
eiI @ main.foss.dart.js?v=5.8.29:7019
(anonymous) @ main.foss.dart.js?v=5.8.29:343847
Hh @ main.foss.dart.js?v=5.8.29:103353
$0 @ main.foss.dart.js?v=5.8.29:102654
aol @ main.foss.dart.js?v=5.8.29:6883
Cb @ main.foss.dart.js?v=5.8.29:102579
$0 @ main.foss.dart.js?v=5.8.29:102624
eiG @ main.foss.dart.js?v=5.8.29:7016
(anonymous) @ main.foss.dart.js?v=5.8.29:343846
Hf @ main.foss.dart.js?v=5.8.29:103351
Hg @ main.foss.dart.js?v=5.8.29:103326
$0 @ main.foss.dart.js?v=5.8.29:103403
h7J @ main.foss.dart.js?v=5.8.29:6915
hdA @ main.foss.dart.js?v=5.8.29:6917
$1 @ main.foss.dart.js?v=5.8.29:102157
childList (async)
$1 @ main.foss.dart.js?v=5.8.29:102164
fqi @ main.foss.dart.js?v=5.8.29:6922
eiJ @ main.foss.dart.js?v=5.8.29:7037
El @ main.foss.dart.js?v=5.8.29:103369
alC @ main.foss.dart.js?v=5.8.29:102586
t0 @ main.foss.dart.js?v=5.8.29:102584
ao @ main.foss.dart.js?v=5.8.29:102496
$1 @ main.foss.dart.js?v=5.8.29:342796
$1 @ main.foss.dart.js?v=5.8.29:342789
eiI @ main.foss.dart.js?v=5.8.29:7022
(anonymous) @ main.foss.dart.js?v=5.8.29:343847
Hh @ main.foss.dart.js?v=5.8.29:103353
Hi @ main.foss.dart.js?v=5.8.29:103330
$1 @ main.foss.dart.js?v=5.8.29:103406
fQ4 @ main.foss.dart.js?v=5.8.29:5312
fho @ main.foss.dart.js?v=5.8.29:8182
fZy @ main.foss.dart.js?v=5.8.29:9936
(anonymous) @ main.foss.dart.js?v=5.8.29:9932
load (async)
a9g @ main.foss.dart.js?v=5.8.29:342785
f8X @ main.foss.dart.js?v=5.8.29:86425
fMI @ main.foss.dart.js?v=5.8.29:86450
(anonymous) @ main.foss.dart.js?v=5.8.29:118406
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
gN5 @ main.foss.dart.js?v=5.8.29:118429
(anonymous) @ main.foss.dart.js?v=5.8.29:118432
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
Rw @ main.foss.dart.js?v=5.8.29:118436
(anonymous) @ main.foss.dart.js?v=5.8.29:260273
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
aJZ @ main.foss.dart.js?v=5.8.29:260293
$1 @ main.foss.dart.js?v=5.8.29:260265
bf4 @ main.foss.dart.js?v=5.8.29:119286
(anonymous) @ main.foss.dart.js?v=5.8.29:5491
J1 @ main.foss.dart.js?v=5.8.29:119199
(anonymous) @ main.foss.dart.js?v=5.8.29:119193
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
b8Q @ main.foss.dart.js?v=5.8.29:119197
a6u @ main.foss.dart.js?v=5.8.29:119151
(anonymous) @ main.foss.dart.js?v=5.8.29:119206
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
aJi @ main.foss.dart.js?v=5.8.29:119225
$1 @ main.foss.dart.js?v=5.8.29:119201
(anonymous) @ main.foss.dart.js?v=5.8.29:154441
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
b78 @ main.foss.dart.js?v=5.8.29:154469
UR @ main.foss.dart.js?v=5.8.29:154433
$1 @ main.foss.dart.js?v=5.8.29:154471
(anonymous) @ main.foss.dart.js?v=5.8.29:153918
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
aJX @ main.foss.dart.js?v=5.8.29:153941
$2 @ main.foss.dart.js?v=5.8.29:153913
$0 @ main.foss.dart.js?v=5.8.29:95808
eiG @ main.foss.dart.js?v=5.8.29:7016
(anonymous) @ main.foss.dart.js?v=5.8.29:343846
Hf @ main.foss.dart.js?v=5.8.29:103351
Hg @ main.foss.dart.js?v=5.8.29:103326
hpM @ main.foss.dart.js?v=5.8.29:2212
nr @ main.foss.dart.js?v=5.8.29:108989
Bw @ main.foss.dart.js?v=5.8.29:108996
aGF @ main.foss.dart.js?v=5.8.29:109010
ST @ main.foss.dart.js?v=5.8.29:182549
(anonymous) @ main.foss.dart.js?v=5.8.29:154395
(anonymous) @ main.foss.dart.js?v=5.8.29:6740
$2 @ main.foss.dart.js?v=5.8.29:102218
Q @ main.foss.dart.js?v=5.8.29:6726
bch @ main.foss.dart.js?v=5.8.29:154405
lF @ main.foss.dart.js?v=5.8.29:154389
$1 @ main.foss.dart.js?v=5.8.29:119115
$1 @ main.foss.dart.js?v=5.8.29:108119
main.foss.dart.js?v=5.8.29:86472 422: The given data was invalid.

 • The documents.0 failed to upload.```

You may want to check if there’s a difference using the React web app.

With react, when uploading, it is processing, but then the processing message disappears. and nothing happens.
Console log:

Summary
axios-60492c0c.js:2 
        
        
       POST https://REDUCTED/api/v1/projects/Wpmbk5ezJn/upload 422 (Unprocessable Content)
(anonymous) @ axios-60492c0c.js:2
Y @ axios-60492c0c.js:2
rt @ axios-60492c0c.js:2
_.request @ axios-60492c0c.js:2
(anonymous) @ axios-60492c0c.js:1
R @ index-f5e0ca5a.js:65
onSubmit @ index-f5e0ca5a.js:1059
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
Promise.then (async)
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
onDrop @ index-f5e0ca5a.js:1059
(anonymous) @ react-dropzone-eadb3dbd.js:5
(anonymous) @ react-dropzone-eadb3dbd.js:5
Promise.then (async)
(anonymous) @ react-dropzone-eadb3dbd.js:5
(anonymous) @ react-dropzone-eadb3dbd.js:3
(anonymous) @ react-dropzone-eadb3dbd.js:3
Na @ react-dom-ce3e84ee.js:13
Pa @ react-dom-ce3e84ee.js:13
_a @ react-dom-ce3e84ee.js:13
_u @ react-dom-ce3e84ee.js:13
ls @ react-dom-ce3e84ee.js:13
(anonymous) @ react-dom-ce3e84ee.js:13
Xi @ react-dom-ce3e84ee.js:16
_o @ react-dom-ce3e84ee.js:13
al @ react-dom-ce3e84ee.js:13
Ei @ react-dom-ce3e84ee.js:13
Wa @ react-dom-ce3e84ee.js:13
index-f5e0ca5a.js:65 N {message: 'Request failed with status code 422', name: 'AxiosError', code: 'ERR_BAD_REQUEST', config: {…}, request: XMLHttpRequest, …}code: "ERR_BAD_REQUEST"config: {transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …}message: "Request failed with status code 422"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}onabort: ƒ ()length: 0name: ""prototype: constructor: ƒ ()[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()arguments: (...)caller: (...)[[FunctionLocation]]: axios-60492c0c.js:2[[Prototype]]: ƒ ()[[Scopes]]: Scopes[5]onerror: ƒ ()onload: nullonloadend: ƒ me()onloadstart: nullonprogress: nullonreadystatechange: nullontimeout: ƒ ()readyState: 4response: "{\"message\":\"The given data was invalid.\",\"errors\":{\"documents.0\":[\"The documents.0 failed to upload.\"]}}"responseText: "{\"message\":\"The given data was invalid.\",\"errors\":{\"documents.0\":[\"The documents.0 failed to upload.\"]}}"responseType: ""responseURL: "https://REDUCTED/api/v1/projects/Wpmbk5ezJn/upload"responseXML: nullstatus: 422statusText: ""timeout: 0upload: XMLHttpRequestUpload {onloadstart: null, onprogress: null, onabort: null, onerror: null, onload: null, …}withCredentials: false[[Prototype]]: XMLHttpRequestresponse: config: {transitional: {…}, transformRequest: Array(1), transformResponse: Array(1), timeout: 0, adapter: ƒ, …}data: {message: 'The given data was invalid.', errors: {…}}headers: {access-control-allow-headers: 'X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-…sition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE', access-control-allow-methods: 'GET, POST, PUT, DELETE, OPTIONS', access-control-allow-origin: '*', access-control-expose-headers: 'X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition', alt-svc: 'h3=":443"; ma=2592000', …}request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, …}status: 422statusText: ""[[Prototype]]: Object[[Prototype]]: Errorconstructor: ƒ N(e,r,t,i,n)toJSON: ƒ ()isAxiosError: true[[Prototype]]: Object
(anonymous) @ index-f5e0ca5a.js:65
Promise.then (async)
_.request @ axios-60492c0c.js:2
(anonymous) @ axios-60492c0c.js:1
R @ index-f5e0ca5a.js:65
onSubmit @ index-f5e0ca5a.js:1059
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
Promise.then (async)
(anonymous) @ formik-4b8c99cc.js:1
(anonymous) @ formik-4b8c99cc.js:1
onDrop @ index-f5e0ca5a.js:1059
(anonymous) @ react-dropzone-eadb3dbd.js:5
(anonymous) @ react-dropzone-eadb3dbd.js:5
Promise.then (async)
(anonymous) @ react-dropzone-eadb3dbd.js:5
(anonymous) @ react-dropzone-eadb3dbd.js:3
(anonymous) @ react-dropzone-eadb3dbd.js:3
Na @ react-dom-ce3e84ee.js:13
Pa @ react-dom-ce3e84ee.js:13
_a @ react-dom-ce3e84ee.js:13
_u @ react-dom-ce3e84ee.js:13
ls @ react-dom-ce3e84ee.js:13
(anonymous) @ react-dom-ce3e84ee.js:13
Xi @ react-dom-ce3e84ee.js:16
_o @ react-dom-ce3e84ee.js:13
al @ react-dom-ce3e84ee.js:13
Ei @ react-dom-ce3e84ee.js:13
Wa @ react-dom-ce3e84ee.js:13

You may want to setup a phpinfo page to confirm the settings are taking effect.

I get the idea about phpinfo, but not sure how to set it up with docker container.

The custom INI file I’ve added does something. Because if I remove it, I go back to 443 from this message

Once I add the INI back - i get 422

So I figured it out, to just needed to put it in public folder and access with https://DOMAIN/phpinfo.php
You are correct with your guess, that upload limit didn’t apply - still 8mb.
Despite the fact the custom INI was parsed

Upload limit

Strange…

Ok, I got it, php really isn’t my strongest side :slight_smile:
so order of reading the files matters, changing the name of the php file so it is last in the list when sorted by name fixed the issue with settings not applying.
I’ve tried uploading files over 8mb - and it worked. So solution #2.

Use Custom PHP.ini settings for docker - upload limits, timezone etc to add settings

in your custom INI file.

1 Like

Glad to hear it’s finally working!