examples/demo-app/src/utils/cloud-providers/dropbox.js
function shareFile(metadata) {
  return dropbox.sharingCreateSharedLinkWithSettings({
    path: metadata.path_display || metadata.path_lower
  }).then(
    // Update URL to avoid CORS issue
    // Unfortunately this is not the ideal scenario but it will make sure people
    // can share dropbox urls with users without the dropbox account (publish on twitter, facebook)
    result => ({
      ...result,
      folder_link: KEPLER_DROPBOX_FOLDER_LINK,
      url: overrideUrl(result.url)
    })
  );
}
function shareFile(metadata) {
  return dropbox.sharingCreateSharedLinkWithSettings({
    path: metadata.path_display || metadata.path_lower
  }).then(
    // Update URL to avoid CORS issue
    // Unfortunately this is not the ideal scenario but it will make sure people
    // can share dropbox urls with users without the dropbox account (publish on twitter, facebook)
    result => ({
      ...result,
      folder_link: KEPLER_DROPBOX_FOLDER_LINK,
      url: overrideUrl(result.url)
    })
  );
}
function shareFile ( metadata ) { return dropbox . sharingCreateSharedLinkWithSettings ( { path : metadata . path_display || metadata . path_lower } ) . then ( // Update URL to avoid CORS issue // Unfortunately this is not the ideal scenario but it will make sure people // can share dropbox urls with users without the dropbox account (publish on twitter, facebook) result => ( { ... result , folder_link : KEPLER_DROPBOX_FOLDER_LINK , url : overrideUrl ( result . url ) } ) ) ; }
It will set access to file to public
@param {Object} metadata metadata response from uploading the file
@returns {Promise<DropboxTypes.sharing.FileLinkMetadataReference | DropboxTypes.sharing.FolderLinkMetadataReference | DropboxTypes.sharing.SharedLinkMetadataReference>}
It will set access to file to public