Skip to content

Conversation

@AnirudhDagar
Copy link
Contributor

@AnirudhDagar AnirudhDagar commented Jan 15, 2026

📝 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:

[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

File Explorer Context Menu
BeforeAfter
before after
File Viewer Toolbar
BeforeAfter
before after

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

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 16, 2026 6:33pm

Request Review

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Jan 15, 2026
@mscolnick
Copy link
Contributor

@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

@AnirudhDagar
Copy link
Contributor Author

@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?

@mscolnick mscolnick changed the title feat: add --disable-file-downloads flag for data security feat: add --disable-file-downloads flag Jan 15, 2026
@mscolnick
Copy link
Contributor

@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)

Copy link
Contributor

@manzt manzt left a 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
manzt previously approved these changes Jan 15, 2026
@manzt manzt self-requested a review January 15, 2026 18:07
Copy link
Contributor

@manzt manzt left a 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!

@AnirudhDagar
Copy link
Contributor Author

Thanks @mscolnick @manzt for sharing your thoughts, I've removed the CLI flag and added the option to change the config in case needed.

@mscolnick mscolnick added the enhancement New feature or request label Jan 16, 2026
@mscolnick mscolnick changed the title feat: add --disable-file-downloads flag feat: add [marimo.server.disable_file_downloads] Jan 16, 2026
@mscolnick
Copy link
Contributor

@AnirudhDagar can you run make fe-codegen. this should fix some changes to the API spec

@AnirudhDagar
Copy link
Contributor Author

Thanks @mscolnick, I've pushed the changes. Forgot to run it after the doc updates.

@mscolnick mscolnick merged commit fc3d0fd into marimo-team:main Jan 16, 2026
43 of 46 checks passed
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.5-dev9

botterYosuke pushed a commit to botterYosuke/marimo that referenced this pull request Jan 17, 2026
## 📝 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>
mscolnick added a commit that referenced this pull request Jan 19, 2026
## 📝 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flag for disabling file download button

3 participants