Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kongtiaowang committed Apr 9, 2024
1 parent 5c1f852 commit 0ba1b98
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules/media/ajax/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,9 @@ function uploadFile()
$language = isset($_POST['language']) ? $_POST['language'] : null;

// If required fields are not set, show an error
if (empty($_FILES)) {
echo showMediaError(
"File could not be uploaded successfully.
Please contact the administrator.",
400
);
if (empty($_POST)) {
echo showMediaError("File too large!", 413);
return;
}

if (!isset($pscid, $visit)) {
Expand Down

0 comments on commit 0ba1b98

Please sign in to comment.