-
Notifications
You must be signed in to change notification settings - Fork 291
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
Provide a simple way to return files in Mesop app #472
Comments
For this, I'm wondering if we can optionally allow the user to register a download route and let the user implement some function to handle downloads. For the simple case, we could wrap the Flask
This also goes back to the question of whether want to expose more of the Flask internals or not. Though I lean toward not exposing more internals since I do think we'll likely want to move away from Flask at some point. Interface maybe something like:
I guess I'm not sure if the Mesop state would be possible to make state accessible from the route function since there could be cases where we just want to serialize data from state for download. Also it seems maybe a bit too specific to register a route specifically for downloads. |
Hi All, I'm interested in this functionality as well. Looking forward to more comments on the topic! |
@kevinknights29 just posted a response to: #453 (comment) - please take a look and let us know if you have any questions or comments. |
Discussed in #453
Originally posted by herb June 17, 2024
I want to setup a website that takes a URL and returns a PDF based on that URL. Back in the day that means an API endpoint that takes a Json body with the URL and returns a response with content type
application/pdf
and the contents of the PDF in the body. And then some trivial html form that has a field for the URL.How do I accomplish this with mesop?
I suspect some of the hangup is the separating line between client and server when writing mesop code. But also how to accomplish the 'download file ' piece is unclear to me.
The text was updated successfully, but these errors were encountered: