mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 11:39:19 -05:00
fix: Validate if the uploaded file is a valid torrent
This commit is contained in:
@@ -74,7 +74,7 @@ class TorrentController extends BaseController
|
||||
return $this->sendError('Validation Error.', 'You Must Provide A Torrent File For Upload!');
|
||||
}
|
||||
|
||||
if ($requestFile->getError() !== 0 && $requestFile->getClientOriginalExtension() !== 'torrent') {
|
||||
if ($requestFile->getError() !== 0 || $requestFile->getClientOriginalExtension() !== 'torrent') {
|
||||
return $this->sendError('Validation Error.', 'You Must Provide A Valid Torrent File For Upload!');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user