mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-22 06:34:36 +01:00
fix file timezone and isDownload for local files temp urls (#837)
closes #834
This commit is contained in:
committed by
Nicolas Dorier
parent
7aa6d1a8d7
commit
461462eafc
@@ -43,7 +43,14 @@ namespace BTCPayServer.Storage
|
||||
{
|
||||
ServeUnknownFileTypes = true,
|
||||
RequestPath = new PathString($"/{FileSystemFileProviderService.LocalStorageDirectoryName}"),
|
||||
FileProvider = new PhysicalFileProvider(dirInfo.FullName)
|
||||
FileProvider = new PhysicalFileProvider(dirInfo.FullName),
|
||||
OnPrepareResponse = context =>
|
||||
{
|
||||
if (context.Context.Request.Query.ContainsKey("download"))
|
||||
{
|
||||
context.Context.Response.Headers["Content-Disposition"] = "attachment";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user