filestack-react icon indicating copy to clipboard operation
filestack-react copied to clipboard

`Invalid Picker Params` when uploading with `tags`

Open highri5e opened this issue 5 years ago • 6 comments

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
      }
    },
}}
/>

highri5e avatar Dec 04 '20 13:12 highri5e

Is it still happening with the newest 4.0 version?

jakubpeksa avatar Dec 22 '20 10:12 jakubpeksa

Yes it does...

highri5e avatar Dec 22 '20 15:12 highri5e

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

highri5e avatar Jan 07 '21 11:01 highri5e

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

jakubpeksa avatar Jan 11 '21 05:01 jakubpeksa

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

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

konradkrk avatar Jan 11 '21 12:01 konradkrk

@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.

highri5e avatar Jan 11 '21 13:01 highri5e