reflex
reflex copied to clipboard
pc.upload does not support event handler list
Describe the bug
pc.uolpad, followed by pc.icon:
pc.icon(tag="arrow_up", on_click=[lambda: State.assign_tid(item[1][1]), lambda: State.handle_upload(pc.upload_files())]
And handle_upload will read a base var setted by assign_tid to rename the file.
Problem is: I see assign_tid has been executed, while handle_upload not. If this is not supported, anyway to rename the uploaded file with a dymanic and specified one?
To Reproduce Steps to reproduce the behavior:
- Code/Link to Repo:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
** Specifics (please complete the following information):**
- Python Version:3.7
- Reflex Version:0.1.34
- OS: Windows
- Browser (Optional):
Additional context Add any other context about the problem here.
Yes, the pc.upload_files() cannot work in the event chain.
I need to rename the file according to the place where upload button is clicked. Anyone knows how to do this as a workaround before event chain finally is supported please?
Dupe of #1066