-
Notifications
You must be signed in to change notification settings - Fork 493
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
Additional parameter for flet.fastapi.app
to customize upload_endpoint_path
#2924
Comments
flet.fastapi.app
to customize upload_endpoint_path
Will you mind opening a PR to share your idea? |
Sure, I will open a PR :) |
This is how I am doing it currently. User selected file is uploaded into the dynamically created folder based on user input via variable session_area_path.@app.put("/upload")
|
Your method is working and seems ok for the basic purpose, but the topic is about |
@timok19 Got this. |
Make
upload_endpoint_path
customizable fromflet.fastapi.app
Current implementation of the Flet app with FastAPI support does not allow to add custom endpoint for uploading files from
FilePicker
component. It is only possible via specific environment variable. In that case there is no flexibility.Solution
upload_endpoint_path
to theapp()
function in theflet.fastapi
and providing it to theFletApp()
instance will solve the problem.upload_endpoint_path
from the FastAPI mainExample of the change
And also considering to remove an unnecessary if check in this part of the
app.py
:The text was updated successfully, but these errors were encountered: