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

Widget: File Upload #981

Merged
merged 6 commits into from
Jun 20, 2024
Merged

Widget: File Upload #981

merged 6 commits into from
Jun 20, 2024

Conversation

joepavitt
Copy link
Collaborator

@joepavitt joepavitt commented Jun 15, 2024

Description

  • Adds new "File Input" widget. Seen lots of people recently trying to implement their own, so we should be providing this out of the box really.
  • Provides good collection of properties to get started with:
    • icon
    • label
    • allow multiple
    • accept file types)

Related Issue(s)

Closes #44

@joepavitt
Copy link
Collaborator Author

joepavitt commented Jun 19, 2024

Agreed with Steve that steps will be as follows:

  • Create a maxFileSize property on the node that is driven by the RED.settings max file size for socketIO, with the default size if no override is presented. - this this post for more context
  • This will be enforced client-side to ensure SocketIO connection isn't broken
  • As a follow-on task, we will then look into chunking Websocket traffic for the file transfer, which would enable better progress reporting client-side, and enable larger files to be transferred

Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joe, it kinda looks like multiple upload was disabled (through the code) but the option appears to still be visible and is mentioned in the help.

can you clarify please?

ui/src/widgets/ui-file-input/UIFileInput.vue Outdated Show resolved Hide resolved
ui/src/widgets/ui-file-input/UIFileInput.vue Show resolved Hide resolved
ui/src/widgets/ui-file-input/UIFileInput.vue Outdated Show resolved Hide resolved
@joepavitt joepavitt requested a review from Steve-Mcl June 20, 2024 11:59
@joepavitt
Copy link
Collaborator Author

@Steve-Mcl have fixed/implemented the multiple file upload, and updated docs to reflect the detail that it'll send multiple msg events

@joepavitt joepavitt merged commit ceb0327 into main Jun 20, 2024
1 of 2 checks passed
@joepavitt joepavitt deleted the 44-file-upload branch June 20, 2024 12:51
@joepavitt joepavitt mentioned this pull request Aug 13, 2024
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

Successfully merging this pull request may close these issues.

Widget: File Upload
2 participants