FileHandler: fix

This commit is contained in:
pavelbannov 2020-04-15 13:46:24 +03:00
parent 12436fb832
commit a1e1cd17be

View File

@ -38,9 +38,10 @@ namespace ASC.Web.Core.Files
// to RFC 2231 (with clarifications from RFC 5987) // to RFC 2231 (with clarifications from RFC 5987)
if (fileName.Any(c => (int)c > 127)) if (fileName.Any(c => (int)c > 127))
{ {
//.netcore
var str = withoutBase var str = withoutBase
? "{0}; filename*=UTF-8''{2}" ? "{0}; filename*=UTF-8''{2}"
: "{0}; filename=\"{1}\"; filename*=UTF-8''{2}"; : "{0}; filename=\"{2}\"; filename*=UTF-8''{2}";
return string.Format(str, return string.Format(str,
inline ? "inline" : "attachment", inline ? "inline" : "attachment",