People: changed photo upload function

This commit is contained in:
NikolayRechkin 2019-09-24 17:07:24 +03:00
parent f51c5d7ded
commit 1a98489513

View File

@ -693,9 +693,11 @@ namespace ASC.Employee.Core.Controllers
return result;
}
[Create("{userid}/photo")]
public FileUploadResult UploadMemberPhoto(string userid, UploadPhotoModel model)
public FileUploadResult UploadMemberPhoto(string userid, IFormCollection model)
{
var result = new FileUploadResult();
bool autosave = Boolean.Parse(model["Autosave"]);
try
{
if (model.Files.Count != 0)
@ -730,7 +732,7 @@ namespace ASC.Employee.Core.Controllers
CheckImgFormat(data);
if (model.Autosave)
if (autosave)
{
if (data.Length > SetupInfo.MaxImageUploadSize)
throw new ImageSizeLimitException();