Skip to content
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

Serving files #4826

Closed
willmcgugan opened this issue Jul 31, 2024 · 1 comment
Closed

Serving files #4826

willmcgugan opened this issue Jul 31, 2024 · 1 comment
Assignees

Comments

@willmcgugan
Copy link
Collaborator

We need a method to expose a file from a Textual app which save it locally, or downloads it when running as a web application.

Locally the file would be copied to a pre-determined directory. Probably ~/Downloads or whatever makes sense on the OS.

As a web application, the browser would treat it as a download.

The API would be something like this (on App):

def save_file(self, path_or_filelilke, mime_type:str, download:bool) -> None:
    ...

TBD

  • Should we separate opening a file from downloading?
  • How do we configure where the file saves locally?
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants