filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
205 stars 81 forks source link

`cropFiles` option for drop pane throws 'invalid params error' #535

Open allmarkedup opened 1 year ago

allmarkedup commented 1 year ago

Adding a cropFiles entry in the dropPane config throws an error and prevents the drop pane from functioning.

It doesn't seem to matter what the value is (true or false) - the error is thrown if the cropFiles key is present. The following will throw an error:

client
  .picker({
    container: "#my-drop-pane",
    displayMode: "dropPane",
    dropPane: {
      cropFiles: true,
      overlay: false,
      onSuccess: function (res) {
        console.log(res);
      },
    },
  })
  .open();

Expected Behavior

The dropPane options should accept a cropFiles option, as described in the docs.

Current Behavior

Including a cropFiles entry in the dropPane options throws an error.

Steps to Reproduce (for bugs)

This fiddle (with cropFiles option) throws an error: https://jsfiddle.net/he9k8c7w/4/ Remove the cropFiles option and it works fine: https://jsfiddle.net/wftLu57z/

Additional Screenshots

CleanShot 2023-10-18 at 10 42 26@2x

Your Environment