Skip to content
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

Bug: Uploading a file with VFileInput throws an error #3

Closed
DavidBerger98 opened this issue Oct 26, 2022 · 0 comments
Closed

Bug: Uploading a file with VFileInput throws an error #3

DavidBerger98 opened this issue Oct 26, 2022 · 0 comments

Comments

@DavidBerger98
Copy link
Contributor

With versions of trame-server>2.2.0 uploading a file with vuetify.VFileInput throws an error on the client saying Method result cannot be serialized.

But the handle method is still executed correctly.

To reproduce:

from trame.app import get_server
from trame.ui.vuetify import SinglePageWithDrawerLayout
from trame.widgets import vuetify
from trame.app.file_upload import ClientFile


server = get_server()


with SinglePageWithDrawerLayout(server) as layout:
    with layout.toolbar:
        vuetify.VFileInput(
            v_model=("file_exchange", None),
        )


@server.state.change("file_exchange")
def handle(file_exchange, **kwargs):
    file = ClientFile(file_exchange)
    print(file.info)


server.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant