Skip to content

On 0.7.8 the rx.upload functionality is broken #5187

@sebastianjanisch

Description

@sebastianjanisch

Describe the bug
on 0.7.8 the rx.upload functionality is broken

To Reproduce
See code, handle_upload will print None when uploading any file.

  • Code/Link to Repo:
import reflex as rx


class UploadState(rx.State):

    def handle_upload(self, files: list[rx.UploadFile] | None = None) -> None:
        print(files)


def upload_page() -> rx.Component:
    return rx.upload(
        id="my_upload",
        on_drop=UploadState.handle_upload(rx.upload_files(upload_id="my_upload")),
    )

Expected behavior
Working upload.

Screenshots
N/A

Specifics (please complete the following information):

  • Python Version: 3.11
  • Reflex Version: 0.7.8
  • OS: Docker/Unix
  • Browser (Optional): Chrome

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions