Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| (e.g., using content-disposition headers). | ||
| """ | ||
| file_bytes = await self.download(path) | ||
| filename = path.rsplit("/", 1)[-1] or "download" |
There was a problem hiding this comment.
it doesn't fail, downloads the root. Added a test case
marimo/_runtime/runtime.py
Outdated
| return | ||
|
|
||
| try: | ||
| entries = backend.list_entries( |
There was a problem hiding this comment.
good catch! missed this
|
|
||
| name: ClassVar[str] = "storage-download-ready" | ||
| request_id: RequestId | ||
| url: Optional[str] = None |
There was a problem hiding this comment.
it might be better to just pass the bytes and a mimetype, and construct a data-url on the frontend. have you thought through the tradeoffs? the pro i see is that you don't need a dependency on the VFile system
There was a problem hiding this comment.
Yeah, my reasoning was we don't want to pass back a large payload through the websocket channel, similar to downloading table data 🤔. Let the frontend/browser handle downloading it. I don't think it's a strong reason..
There was a problem hiding this comment.
Ok sounds good. It might fail since not tied to a cell but I can't remember
marimo/_server/api/router.py
Outdated
| app_router.include_router(sql_router, prefix="/api/sql", name="sql") | ||
| app_router.include_router( | ||
| external_storage_router, | ||
| prefix="/api/external-storage", |
There was a problem hiding this comment.
thoughts on just /api/storage? just a cleaner route and maybe lets use move the filesystem there as well
📝 Summary
/api/storage/list_entries,/api/storage/download) that let the frontend browse and download files from external storage backends (obstore, fsspec)🔍 Description of Changes
📋 Checklist