Skip to content

Commit

Permalink
Merge pull request #11 from daetcm/fix-accept-file-types
Browse files Browse the repository at this point in the history
Fix accept file types
  • Loading branch information
nguyenk authored Oct 25, 2021
2 parents 8d86abc + 24dabe0 commit 1319375
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ public function setAcceptFileTypes($acceptFileTypes) {
$this->acceptFileTypes = $acceptFileTypes;
return $this;
}


public function getAcceptFileTypes() {
return $this->acceptFileTypes;
}

/**
* The message to display when file doesnt match the $acceptFileTypes.
*
Expand Down
3 changes: 2 additions & 1 deletion src/direct/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
header('Content-Type: application/json');

$upload_handler = new MoufUploadHandler([
'upload_dir'=>$targetDir
'upload_dir'=>$targetDir,
'accept_file_types'=>$uploader->getAcceptFileTypes()
]);

$uploader->afterUpload($targetDir, $token);

0 comments on commit 1319375

Please sign in to comment.