Skip to content

Commit

Permalink
scrollbar fix + support for fallback disposition filename
Browse files Browse the repository at this point in the history
  • Loading branch information
pegasko committed Feb 18, 2024
1 parent f29c39a commit 5c22b56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xleb/fapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def handle_download(request: aiohttp.web.Request) -> aiohttp.web.Response:
return aiohttp.web.FileResponse(
fspath,
headers={
aiohttp.hdrs.CONTENT_DISPOSITION: f'''inline; filename*=UTF-8''"{ urllib.parse.quote(fname, safe='') }"'''
aiohttp.hdrs.CONTENT_DISPOSITION: f'''inline; filename*=UTF-8''"{ urllib.parse.quote(fname, safe='') }"; filename="{ urllib.parse.quote(fname.encode('utf-8').decode('ascii', 'ignore'), safe='') }"'''
}
)

Expand Down
2 changes: 1 addition & 1 deletion xleb/static/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ body, html {

gap: var(--gap);

overflow: scroll;
overflow: auto;
}

.file-nav {
Expand Down

0 comments on commit 5c22b56

Please sign in to comment.