18 lines
No EOL
672 B
Text
18 lines
No EOL
672 B
Text
@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;
|
|
} |