Skip to content

Bug: pin.put_file_upload does not work #684

@amks1

Description

@amks1

Since the recent change that added the function pin.get_pin_values(), the pin.put_file_upload() function doesn't return a usable dict.

Test code:

import pywebio.pin as pin
import pywebio.output as pwo

def handle_convert():
    pinvalues = pin.get_pin_values(['files', 'mode'])
    file_upload1 = pinvalues['files']
    file_upload2 = pin.pin['files']
    print(file_upload1)
    print(file_upload2)

pin.put_file_upload('files', label='Upload files for conversion', multiple=False)
pwo.put_button('Convert', onclick=handle_convert)

In the above code, both file_upload1 and file_upload2 are dicts that look like this:

{'multiple': False, 'files': [{}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions