public async Task <IActionResult> FromSecret(FromSecretAddressModel model)
        {
            var download = !string.IsNullOrWhiteSpace(model.Sd);
            var secret   = await _dbContext
                           .Secrets
                           .Include(t => t.File)
                           .SingleOrDefaultAsync(t => t.Value == model.Sec);

            if (secret == null || secret.UsedTimes >= secret.MaxUseTime)
            {
                return(NotFound());
            }
            secret.UsedTimes++;
            secret.UseTime       = DateTime.UtcNow;
            secret.UserIpAddress = HttpContext.Connection.RemoteIpAddress.ToString();
            await _dbContext.SaveChangesAsync();

            var bucket = await _dbContext
                         .Bucket
                         .SingleOrDefaultAsync(t => t.BucketId == secret.File.BucketId);

            var path = _configuration["StoragePath"] + $"{_}Storage{_}{bucket.BucketName}{_}{secret.File.FileKey}.dat";

            return(await ReturnFile(path, model.H, model.W, secret.File.RealFileName, download, model.Name));
        }
        public async Task <IActionResult> FromSecret(FromSecretAddressModel model)
        {
            var download = !string.IsNullOrWhiteSpace(model.sd);
            var secret   = await _dbContext
                           .Secrets
                           .Include(t => t.File)
                           .SingleOrDefaultAsync(t => t.Value == model.sec);

            if (secret == null || secret.Used)
            {
                return(NotFound());
            }
            secret.Used          = true;
            secret.UseTime       = DateTime.Now;
            secret.UserIpAddress = HttpContext.Connection.RemoteIpAddress.ToString();
            await _dbContext.SaveChangesAsync();

            var bucket = await _dbContext
                         .Bucket
                         .SingleOrDefaultAsync(t => t.BucketId == secret.File.BucketId);

            var path = _configuration["StoragePath"] + $"{_}Storage{_}{bucket.BucketName}{_}{secret.File.FileKey}.dat";

            try
            {
                if (StringOperation.IsImage(secret.File.RealFileName) && model.h > 0 && model.w > 0)
                {
                    return(await this.AiurFile(await _imageCompresser.Compress(path, secret.File.RealFileName, model.w, model.h), secret.File.RealFileName));
                }
                else
                {
                    return(await this.AiurFile(path, secret.File.RealFileName, download));
                }
            }
            catch (Exception e) when(e is DirectoryNotFoundException || e is FileNotFoundException)
            {
                return(NotFound());
            }
        }