Skip to content

Commit

Permalink
fix #71 Error when downloading an floder not named in English
Browse files Browse the repository at this point in the history
  • Loading branch information
eastonsuo committed Oct 11, 2021
1 parent a154614 commit 233f92b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jupyter_archive/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from jupyter_server.base.handlers import JupyterHandler
from jupyter_server.utils import url2path, url_path_join
from tornado import ioloop, web
from urllib.parse import quote

SUPPORTED_FORMAT = [
"zip",
Expand Down Expand Up @@ -142,6 +143,7 @@ async def get(self, archive_path, include_body=False):

archive_path = pathlib.Path(cm.root_dir) / url2path(archive_path)
archive_filename = f"{archive_path.name}.{archive_format}"
archive_filename = quote(archive_filename)

self.log.info("Prepare {} for archiving and downloading.".format(archive_filename))
self.set_header("content-type", "application/octet-stream")
Expand Down

0 comments on commit 233f92b

Please sign in to comment.