packages/netlify-cms-media-library-uploadcare/src/index.js
function getFileGroup(files) {
  /**
   * Capture the group id from the first file in the files array.
   */
  const groupId = new RegExp(`^.+/([^/]+~${files.length})/nth/`).exec(files[0])[1];

  /**
   * The `openDialog` method handles the jQuery promise object returned by
   * `fileFrom`, but requires the promise returned by `loadFileGroup` to provide
   * the result of it's `done` method.
   */
  return new Promise(resolve => uploadcare.loadFileGroup(groupId).done(group => resolve(group)));
}
function getFileGroup(files) {
  /**
   * Capture the group id from the first file in the files array.
   */
  const groupId = new RegExp(`^.+/([^/]+~${files.length})/nth/`).exec(files[0])[1];

  /**
   * The `openDialog` method handles the jQuery promise object returned by
   * `fileFrom`, but requires the promise returned by `loadFileGroup` to provide
   * the result of it's `done` method.
   */
  return new Promise(resolve => uploadcare.loadFileGroup(groupId).done(group => resolve(group)));
}
function getFileGroup ( files ) { /**
   * Capture the group id from the first file in the files array.
   */ const groupId = new RegExp ( ` ${ files . length } ` ) . exec ( files [ 0 ] ) [ 1 ] ; /**
   * The `openDialog` method handles the jQuery promise object returned by
   * `fileFrom`, but requires the promise returned by `loadFileGroup` to provide
   * the result of it's `done` method.
   */ return new Promise ( resolve => uploadcare . loadFileGroup ( groupId ) . done ( group => resolve ( group ) ) ) ; }
Returns a fileGroupInfo object wrapped in a promise-like object.
Returns a fileGroupInfo object wrapped in a promise - like object .