upload-file widget/example #331
-
|
Will somebody be kind enough to provide a minimal example on how to setup a widget to upload a file? |
Beta Was this translation helpful? Give feedback.
Answered by
patricia-causalens
Jul 4, 2024
Replies: 1 comment
-
|
Hi @gsal, You can use our from dara.components import UploadDropzone
def resolve_file_uploaded(file:bytes, file_name: str):
print(file_name)
UploadDropzone(
accept="image/png, image/jpeg",
resolver=resolve_file_uploaded
)Please check our Dropzone docs to learn more about the props it accepts, and do let us know if you have any questions about how to use it. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
patricia-causalens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @gsal,
You can use our
Dropzonecomponent to upload files, here is a small example of how this might be set up:Please check our Dropzone docs to learn more about the props it accepts, and do let us know if you have any questions about how to use it.