From aeb04e91304713ca23b9dc24b206bf2aab456832 Mon Sep 17 00:00:00 2001 From: Sheldon <32926567+sheldonchiu@users.noreply.github.com> Date: Sat, 24 Jun 2023 02:46:53 +0800 Subject: [PATCH] fix upload file not set state before return (#1227) --- pynecone/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pynecone/app.py b/pynecone/app.py index df0aa9566..f1f2e3785 100644 --- a/pynecone/app.py +++ b/pynecone/app.py @@ -610,6 +610,9 @@ def upload(app: App): ) # TODO: refactor this to handle yields. update = await state._process(event).__anext__() + + # Set the state for the session. + app.state_manager.set_state(event.token, state) return update return upload_file