mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 21:13:35 +08:00
Validating the comments form
Work Items: 16666, 16568 --HG-- branch : dev
This commit is contained in:
@@ -149,7 +149,7 @@ namespace Orchard.Media.Controllers {
|
||||
if (!Services.Authorizer.Authorize(Permissions.UploadMediaFiles, T("Couldn't upload media file")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if(Request.Files[0].FileName.IsNullOrEmptyTrimmed()) {
|
||||
if(String.IsNullOrWhiteSpace(Request.Files[0].FileName)) {
|
||||
ModelState.AddModelError("File", T("Select a file to upload").ToString());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user