fix: reduce presigned url len
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-02-13 13:58:03 +00:00
parent 6765eaf493
commit 30442d2ddb
2 changed files with 7 additions and 6 deletions

View File

@ -62,7 +62,7 @@ public class S3DvrStore(Config config, HttpClient httpClient, ILogger<S3DvrStore
{ {
BucketName = _config.BucketName, BucketName = _config.BucketName,
Key = key, Key = key,
Expires = DateTime.UtcNow.AddSeconds(604000) Expires = DateTime.UtcNow.AddSeconds(600_000)
}); });
var ub = new UriBuilder(url) var ub = new UriBuilder(url)

View File

@ -36,7 +36,7 @@ public class S3ThumbnailService(Config config, ILogger<S3ThumbnailService> logge
{ {
BucketName = Config.S3Store.BucketName, BucketName = Config.S3Store.BucketName,
Key = s3Path, Key = s3Path,
Expires = DateTime.UtcNow.AddYears(1000) Expires = DateTime.UtcNow.AddSeconds(800_000)
}); });
var ub = new UriBuilder(uri) var ub = new UriBuilder(uri)
@ -58,7 +58,8 @@ public class S3ThumbnailService(Config config, ILogger<S3ThumbnailService> logge
fs.Close(); fs.Close();
File.Delete(path); File.Delete(path);
Logger.LogInformation("{id} generated={tg:#,##0}ms, uploaded={tu:#,##0}ms, db={td:#,##0}ms", stream.Id, tGen.TotalMilliseconds, Logger.LogInformation("{id} generated={tg:#,##0}ms, uploaded={tu:#,##0}ms, db={td:#,##0}ms", stream.Id,
tGen.TotalMilliseconds,
tUpload.TotalMilliseconds, tDbUpdate.TotalMilliseconds); tUpload.TotalMilliseconds, tDbUpdate.TotalMilliseconds);
} }
catch (Exception ex) catch (Exception ex)