[Route("attachments"), HttpGet, AllowAnonymous]
public ActionResult GetAttachedFilesForOperation(int operationId)
{
string archiveFileName = _operationService.GetShortName(operationId);
string archiveFile = string.Empty;
if (User.IsInRole("Developer") || User.IsInRole("Admin"))
{
archiveFile = _operationService.GetArchiveWithAttachmentsForOperation(operationId);
return File(archiveFile, "aplication/zip", archiveFileName + ".zip");
}
else if (User.IsInRole("Controller"))
{
archiveFile = _operationService.GetArchiveWithAttachmentsForVerificationByOperation(operationId);