1

i Have like 30 uploads using postman. on the receiving endpoint function i tried to print_r all the uploads that were supposed to be received by PHP

public function capture() {

    print_r($_FILES);exit;

}

out of the 30 uploads only 20 got printed. There's no limit in the $_FILES super variables right? is there anyway that I can capture all 30 uploads via PHP ?

sasori
  • 5,249
  • 16
  • 86
  • 138
  • Please Check This Url [Please Click this](https://stackoverflow.com/questions/28185300/how-to-send-multiple-files-in-postman-restful-web-service) – Istiake Nov 04 '22 at 04:25

1 Answers1

2

Typically, the "20 files upload limit" problem is not imposed by the limit in the $FILES super global, but related to php max_file_uploads limit

So if you are trying to upload an array of files, you will not be able to upload more than 20 files due to max_file_uploads limit in php. ini which is by default set to 20 . So you have to increase this limit to upload more than 20 files

For details, please visit

https://www.php.net/manual/en/ini.core.php

(see section on max_file_uploads)

Ken Lee
  • 6,985
  • 3
  • 10
  • 29
  • This is a huge problem. it's prohibited to alter any server configuration especially the php.ini...what if I use ini_set at the beginning of my endpoint function to adjust the max_file_uploads. is that a viable solution for this without altering the php.ini file ? – sasori Nov 05 '22 at 15:45
  • In my understanding it is possible to use ini_set (or .htaccess) in most servers (unless the web server admin has imposed further restriction on ini_set) . Please see this [SO post](https://stackoverflow.com/questions/40300956/how-to-fix-max-file-uploads-limit-increase-in-our-hosted-domain) too – Ken Lee Nov 05 '22 at 15:48