Exemple #1
0
        public IActionResult DownloadUploadFile(string guid)
        {
            var upload = _uploadService.FirstOrDefault(x => x.Guid == guid);

            if (upload == null || upload.UserId != CurrentUser.Id)
            {
                return(NotFound());
            }
            return(File(upload.FileBytes, upload.FileType, $"{upload.UserId}.{upload.Guid}.{upload.FileExtension}"));
        }