-
Notifications
You must be signed in to change notification settings - Fork 880
feat: add [marimo.server.disable_file_downloads] #7844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add [marimo.server.disable_file_downloads] #7844
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@AnirudhDagar thanks for making this PR. there are a few other places its possible to download files. and this may still be possible through the APIs, etc. this feature may attract more bug and followup FRs that we might not be able to handle at the moment |
|
@mscolnick If you could point me to the other places where we'd want to block the downloads when the flag is on, I'd be happy to take a look and update the PR. But if this is a feature that we don't want to add yet due to bandwidth, I can close the PR? |
|
@AnirudhDagar i was wrong, i thought we had a specific endpoint to download (instead we just read it on the frontend and then download it). we can finish off this PR. i left some comments. also we don't need a CLI flag for this to reduce the API surface area (and can just pick this up from user config) |
manzt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. I agree with regard to adding the flag to the CLI to avoid increasing API surface.
manzt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, meant to comment not yet approve!
|
Thanks @mscolnick @manzt for sharing your thoughts, I've removed the CLI flag and added the option to change the config in case needed. |
|
@AnirudhDagar can you run |
|
Thanks @mscolnick, I've pushed the changes. Forgot to run it after the doc updates. |
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.5-dev9 |
## 📝 Summary Fix marimo-team#7830 ## 🔍 Description of Changes Adds a new config flag `[marimo.server.disable_file_downloads]` that hides the file download button in the file explorer and viewer toolbar. Usage: ```bash [tool.marimo.server] disable_file_downloads = True ``` When enabled, the download button is hidden in: * File explorer context menu (screenshot 1) * File viewer toolbar (screenshot 2) Screenshots <table> <tr><th colspan="2">File Explorer Context Menu</th></tr> <tr><td><strong>Before</strong></td><td><strong>After</strong></td></tr> <tr> <td><img width="300" alt="before" src="https://github.com/user-attachments/assets/fcb7edbc-88d9-40ff-b7e9-1b235396d6c9" /></td> <td><img width="300" alt="after" src="https://github.com/user-attachments/assets/08c104ed-7557-43d0-aad5-088daa6a1563" /></td> </tr> <tr><th colspan="2">File Viewer Toolbar</th></tr> <tr><td><strong>Before</strong></td><td><strong>After</strong></td></tr> <tr> <td><img width="300" alt="before" src="https://github.com/user-attachments/assets/208e5973-13a9-4cf1-b7ba-3834f285454d" /></td> <td><img width="300" alt="after" src="https://github.com/user-attachments/assets/07523df6-cdca-410c-bca1-dd3c8ece3960" /></td> </tr> </table> ps. I was not sure if we need this flag for all run/tutorial/new/edit, so I added it for consistency but I can change that based on the review. ## 📋 Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [x] Tests have been added for the changes made. - [x] Documentation has been updated where applicable, including docstrings for API changes. - [x] Pull request title is a good summary of the changes - it will be used in the [release notes](https://github.com/marimo-team/marimo/releases). --------- Co-authored-by: Myles Scolnick <myles@marimo.io>
## 📝 Summary Fix #7830 ## 🔍 Description of Changes Adds a new config flag `[marimo.server.disable_file_downloads]` that hides the file download button in the file explorer and viewer toolbar. Usage: ```bash [tool.marimo.server] disable_file_downloads = True ``` When enabled, the download button is hidden in: * File explorer context menu (screenshot 1) * File viewer toolbar (screenshot 2) Screenshots <table> <tr><th colspan="2">File Explorer Context Menu</th></tr> <tr><td><strong>Before</strong></td><td><strong>After</strong></td></tr> <tr> <td><img width="300" alt="before" src="https://github.com/user-attachments/assets/fcb7edbc-88d9-40ff-b7e9-1b235396d6c9" /></td> <td><img width="300" alt="after" src="https://github.com/user-attachments/assets/08c104ed-7557-43d0-aad5-088daa6a1563" /></td> </tr> <tr><th colspan="2">File Viewer Toolbar</th></tr> <tr><td><strong>Before</strong></td><td><strong>After</strong></td></tr> <tr> <td><img width="300" alt="before" src="https://github.com/user-attachments/assets/208e5973-13a9-4cf1-b7ba-3834f285454d" /></td> <td><img width="300" alt="after" src="https://github.com/user-attachments/assets/07523df6-cdca-410c-bca1-dd3c8ece3960" /></td> </tr> </table> ps. I was not sure if we need this flag for all run/tutorial/new/edit, so I added it for consistency but I can change that based on the review. ## 📋 Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [x] Tests have been added for the changes made. - [x] Documentation has been updated where applicable, including docstrings for API changes. - [x] Pull request title is a good summary of the changes - it will be used in the [release notes](https://github.com/marimo-team/marimo/releases). --------- Co-authored-by: Myles Scolnick <myles@marimo.io>
📝 Summary
Fix #7830
🔍 Description of Changes
Adds a new config flag
[marimo.server.disable_file_downloads]that hides the file download button in the file explorer and viewer toolbar.Usage:
When enabled, the download button is hidden in:
Screenshots
ps. I was not sure if we need this flag for all run/tutorial/new/edit, so I added it for consistency but I can change that based on the review.
📋 Checklist