I was trying to shows attachment.
I was expecting showing attachment
Instead I’ve got error “Invalid non-ASCII or control character in header: 0x00E1“
{
-
“ClassName”: “System.InvalidOperationException”,
-
“Message”: “Invalid non-ASCII or control character in header: 0x00E1”,
-
“Data”: null,
-
“InnerException”: null,
-
“HelpURL”: null,
-
“StackTraceString”: " at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.ThrowInvalidHeaderCharacter(Char ch)\r\n at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseHeaders.SetValueFast(String key, StringValues value)\r\n at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_Item(String key, StringValues value)\r\n at Microsoft.AspNetCore.Http.ParsingHelpers.AppendHeaderUnmodified(IHeaderDictionary headers, String key, StringValues values)\r\n at Origam.Server.Controller.BlobController.Get(Guid token) in M:\\gitave\\origam.origam\\backend\\Origam.Server\\Controller\\BlobController.cs:line 166",
-
“RemoteStackTraceString”: null,
-
“RemoteStackIndex”: 0,
-
“ExceptionMethod”: null,
-
“HResult”: -2146233079,
-
“Source”: “Microsoft.AspNetCore.Server.Kestrel.Core”,
-
“WatsonBuckets”: null
}
The file name is causing a problem. When the file name is “Obrázek WhatsApp, 2025-05-05 v 08.17.59_7ba3d48d.jpg” or “Snímek obrazovky 2025-08-05 212236.png”, the file can’t be downloaded or displayed.