You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you explain to me why the following endpoint doesn't work with flet.fastapi.app? I can't get the requirements.txt file.
With a simple FastAPI() it works fine. I didn't receive any messages, but I can't get the file or download.
To start the app, I use the following command: uvicorn --host 0.0.0.0 --port 8000 main:app --reload
Try to go using the following url: http://127.0.0.1:8000/download/requirements.txt
First with this: app = flet_fastapi.app(main, upload_dir="uploads", upload_endpoint_path="uploads", session_timeout_seconds=10)
And then the same url with this: app = FastAPI()
Please help me? I can't understand why it doesn't work.
I am using Flet 0.24.1.
Sending you a full example. example.zip
Screenshots:
With app = FastAPI()
With app = flet_fastapi.app(main, upload_dir="uploads", upload_endpoint_path="uploads", session_timeout_seconds=10)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Can you explain to me why the following endpoint doesn't work with flet.fastapi.app? I can't get the requirements.txt file.
With a simple FastAPI() it works fine. I didn't receive any messages, but I can't get the file or download.
To start the app, I use the following command: uvicorn --host 0.0.0.0 --port 8000 main:app --reload


Try to go using the following url: http://127.0.0.1:8000/download/requirements.txt
First with this: app = flet_fastapi.app(main, upload_dir="uploads", upload_endpoint_path="uploads", session_timeout_seconds=10)
And then the same url with this: app = FastAPI()
Please help me? I can't understand why it doesn't work.
I am using Flet 0.24.1.
Sending you a full example.
example.zip
Screenshots:
With app = FastAPI()
With app = flet_fastapi.app(main, upload_dir="uploads", upload_endpoint_path="uploads", session_timeout_seconds=10)
Code sample
Error message
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions