File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ public function getCapabilities(): array {
5151 'envelope ' => [
5252 'is-available ' => $ this ->envelopeService ->isEnabled (),
5353 ],
54+ 'upload ' => [
55+ 'max-file-uploads ' => $ this ->getMaxFileUploads (),
56+ ],
5457 ],
5558 'version ' => $ this ->appManager ->getAppVersion ('libresign ' ),
5659 ];
@@ -59,4 +62,12 @@ public function getCapabilities(): array {
5962 'libresign ' => $ capabilities ,
6063 ];
6164 }
65+
66+ private function getMaxFileUploads (): int {
67+ $ maxFileUploads = ini_get ('max_file_uploads ' );
68+ if (!is_numeric ($ maxFileUploads ) || (int )$ maxFileUploads <= 0 ) {
69+ return 20 ;
70+ }
71+ return (int )$ maxFileUploads ;
72+ }
6273}
Original file line number Diff line number Diff line change 393393 * envelope: array{
394394 * is-available: bool,
395395 * },
396+ * upload: array{
397+ * max-file-uploads: int,
398+ * },
396399 * },
397400 * version: string,
398401 * }
You can’t perform that action at this time.
0 commit comments