Fix large CMS upload timeout with idle heartbeat and add per-file progress meter
Replace the 100s default HttpClient timeout (set Timeout=Infinite) with an idle/heartbeat deadline driven by a ProgressStreamContent wrapper that reports bytes-on-the-wire. Each tick resets the idle window and advances a MudProgressLinear per upload row. Idle window is configurable via Upload:IdleTimeoutSeconds (default 90s).
This commit is contained in:
@@ -52,6 +52,10 @@ builder.Services.AddHttpClient("DeepDrft.Content.Cms", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri(contentApiUrl);
|
||||
client.DefaultRequestHeaders.Add("ApiKey", contentApiKey);
|
||||
// Large mix uploads (several hundred MB) outrun the 100s default whole-request timeout. The send
|
||||
// path enforces an idle/heartbeat deadline instead (CmsTrackService), which can only express
|
||||
// "no bytes for N seconds" if the client itself does not impose a total cap — hence Infinite here.
|
||||
client.Timeout = Timeout.InfiniteTimeSpan;
|
||||
});
|
||||
|
||||
// Reverse-proxy support (nginx in production).
|
||||
|
||||
Reference in New Issue
Block a user