https://discord.gg/botpress logo
Support for Multi‐File Selection in Webchat File P...
# 🤝help
g
hi guys, The Webchat file picker currently only allows users to select and upload a single file at a time. After investigating, it appears that: The
<input type="file">
in the shared components library:
Copy code
packages/components/
  src/
    base/
      button.tsx <-  is the shared UI component that renders a clickable button (and, in the upload case, wraps a hidden file-input for picking files).
      file-input.tsx
The doesn’t include the multiple attribute - so browsers only permit one file per selection - and the upload handler always uses files[0], ignoring any other selected files (which cant be selected anyway due to the missing 'multiple' attribute). I’d like to know: 1) Is there an existing or planned configuration option in Botpress Webchat to enable multi‐file selection and batch uploads? 2) If not, would you recommend I apply a custom patch (adding multiple={true} on the input and looping over all event.target.files) until an official feature is released? Are there any best-practice insights or upcoming roadmap items around multi-file upload support that we should be aware of?
l
g
But you still can’t select multiple images or files, right? I can only send one at a time - I can’t, for example, highlight five images and upload them all together.
l
you can - did you test?
g
ive tried multiple times, i just tried now and i cant send more than one image
holding shift and clicking different images.
im gonna drop you a dm Lijo if thats okay
p
Yes this is comming soon 🙂
l
@plain-lifeguard-16679 - @gentle-policeman-89141 I exchanged DM's and what we understand is that the "+" icon on webchat natively allows to select only one file. However, I can still open file explorer in windows select a bunch of files and drag them to the chat window and it works for me. However, @gentle-policeman-89141 could not do that on in his Mac
p
Indeed we adding this feature and it works on mac. The webchat inject scrip needs to be updated to the latest version
g
Hey Chris I’m on v2.4 but the “+” picker still only lets me pick one file on Mac. Is the native multi-file picker live yet, or coming soon?
p
you can drag and drop multiple files or you can add them one by one right now
g
yeah i know even though i cant get it to work on my mac, but will the “+” picker support selecting multiple files at once as this is important for my use case, or will I have to build a custom workaround?
p
it will
g
thanks alot Chris, I will keep my eyes peeled for the update.
3 Views