JS API - Open dialog functionality


#1

We’re attempting to use upload care to upload and crop a user defined image with the openDialog() function. When using the API like:

uploadcare.openDialog(null, settings);

The dialog launches, the user may choose their ‘tab’, upload, then crop an image.

When using the API like:

uploadcare.openDialog(null, whichTab, settings);

The dialog launches to the tab, upload, then return to app. It skips the crop step even though the settings object is the same. Is there a way to start a particular tab AND let the user crop? Are there more complete docs that describe the JS API?

Thanks,
Alex


#2

Hi Alex,

What widget version are you using? Also, can you share your code snippet so that I can look into it? I checked this case with the last version of the widget and used this code to open the dialog

let dialog = uploadcare.openDialog(null, 'dropbox', {
  crop: '4:3'
});

the crop step is working for me with this setup.


#3

I re-tested today and it is working as expected. Pretty sure I conflated the Facebook issue with this experience. Thanks for your feedback.