init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
18
KretaWeb/Views/Shared/UploadFileValidation.cshtml
Normal file
18
KretaWeb/Views/Shared/UploadFileValidation.cshtml
Normal file
|
@ -0,0 +1,18 @@
|
|||
@using Kreta.Web.Models
|
||||
|
||||
@model UploadFileModel
|
||||
|
||||
var file = e.files[0];
|
||||
|
||||
if (file.size > @Model.MaxAllowedFileSizeInBytes) {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@string.Format(CommonResource.TulNagyFajl, Math.Round((decimal)Model.MaxAllowedFileSizeInBytes / 1024 / 1024))", true);
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if (["@string.Join("\", \"", Model.AllowedFileExtensions)"].indexOf(file.extension.toLowerCase()) == -1)
|
||||
{
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@string.Format(CommonResource.NemMegfeleloFajlKiterjesztes, string.Join(", ", Model.AllowedFileExtensions))", true);
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue