0

I'm using Filestack (filestack-react@4.0.0) in my react app (16.12.0) and whenever I press upload on the picker I get this error in the console. The upload is working correctly and I'm getting the right result back from the onSuccess prop but I don't know if this error is caused by my app.

enter image description here

2 Answers2

2

It's a bug in the filestack-react package related to how it appends the file uploader to a container id for and (but < PickerOverlay /> seems to work ok) you can try create you own component like suggested https://github.com/filestack/filestack-react/issues/116#issuecomment-898969991

0

Workaround if you're doing conditional rendering:

Wrap your component, and ensure that you first render the empty containing div, then in a follow up rendering you render the internal PickerDropPane. This way the id exists before PickerDropPane looks for it.

const pickerOptions = {
  container: 'picker-container',
}

<div id="picker-container">
  <PickerDropPane pickerOptions={pickerOptions}>
</div>
justinsAccount
  • 742
  • 1
  • 10
  • 10