Skip to content

Commit

Permalink
Properly namespacing output_id for render.download in order for it to
Browse files Browse the repository at this point in the history
work in modules
  • Loading branch information
nsiicm0 committed Oct 11, 2024
1 parent bd0ea5c commit 357b86e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shiny/render/_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def url() -> str:
from urllib.parse import quote

session = require_active_session(None)
return f"session/{quote(session.id)}/download/{quote(self.output_id)}?w="
return f"session/{quote(session.id)}/download/{quote(session.ns(self.output_id))}?w="

# Unlike most value functions, this one's name is `url`. But we want to get the
# name from the user-supplied function.
Expand All @@ -705,7 +705,7 @@ def url() -> str:
# have been started.
session = get_current_session()
if session is not None and not session.is_stub_session():
session._downloads[self.output_id] = DownloadInfo(
session._downloads[session.ns(self.output_id)] = DownloadInfo(
filename=self.filename,
content_type=self.media_type,
handler=fn,
Expand Down

0 comments on commit 357b86e

Please sign in to comment.