filestack / filestack-react

Official React component for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
MIT License
164 stars 40 forks source link

`Invalid Picker Params` when uploading with `tags` #105

Open highri5e opened 3 years ago

highri5e commented 3 years ago

Trying to add tags option to the actionOptions results in the Invalid Picker Params error.

  711 | constructor(client: Client, options?: PickerOptions) {
  712 |   const validateRes = getValidator(PickerParamsSchema)(options);
  713 | 
> 714 |   if (validateRes.errors.length) {
      | ^  715 |     throw new FilestackError(`Invalid picker params`, validateRes.errors, FilestackErrorType.VALIDATION);
  716 |   }
  717 | 
<PickerOverlay
  apikey="key"
  accept: "image/*",
  maxFiles: 1,
  pickerOptions:{{
    uploadConfig: {
        tags: {
          foo: bar
      }
    },
}}
/>
jakubpeksa commented 3 years ago

Is it still happening with the newest 4.0 version?

highri5e commented 3 years ago

Yes it does...

highri5e commented 3 years ago

Hey any updates on this? I'm a client on a Filestack paid plan and could use this feature.

jakubpeksa commented 3 years ago

That's filestack-js issue, we are currently fixing it

konradkrk commented 3 years ago

@highri5e check: <PickerOverlay apikey='apikey' pickerOptions={{accept:'image/*', maxFiles:1, uploadConfig: {tags: {foo: 'bar'}} }}/>

remember: foo: 'bar' <- must be string

highri5e commented 3 years ago

@konradkrk Thanks.

How did I overlook this? It does not error anymore. The response does not return the upload_tags property though so not sure if it actually works as intended.