Skip to content

Commit

Permalink
Merge pull request #75 from philippebeck/dev
Browse files Browse the repository at this point in the history
Release 3.3.1
  • Loading branch information
philippebeck authored Jun 9, 2020
2 parents 15187e0 + bc4606b commit 7e18b88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "philippebeck/pam",
"version": "3.3.0",
"version": "3.3.1",
"type": "library",
"description": "Php Approachable Microframework",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions core/Controller/Globals/FilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function setFileExtension()
* @param string|null $fileName
* @return mixed|string
*/
public function uploadFile(string $fileDir, string $fileName = null)
public function uploadFile(string $fileDir, string $fileName = null, int $fileSize = 50000000)
{
if ($fileName === null) {
$dest = $fileDir . $this->file["name"];
Expand All @@ -95,7 +95,7 @@ public function uploadFile(string $fileDir, string $fileName = null)
throw new Exception("Invalid parameters...");
}

if ($this->file["size"] > 1000000) {
if ($this->file["size"] > $fileSize) {
throw new Exception("Exceeded filesize limit...");
}

Expand Down

0 comments on commit 7e18b88

Please sign in to comment.