
Product
Unify Your Security Stack with Socket Basics
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
@openmobilehub/storage-dropbox
Advanced tools
Dropbox integration for React Native OMH Storage. Offers a lightweight bridge to integrate your app with Dropbox's cloud storage using the official SDK and API.
Before starting the integration, make sure the following packages are installed and configured:
@openmobilehub/storage-core
react-native-file-access
@react-native-async-storage/async-storage
react-native-app-auth
- Configuration@openmobilehub/auth-core
- Configuration@openmobilehub/auth-dropbox
- Configurationnpm add @openmobilehub/storage-dropbox
To access Dropbox APIs, follow these steps to obtain the Client App Key and Client App Secret:
<YOUR_APPLICATION_ID>://oauth
as your redirect URL for your app.account_info.read
, files.metadata.read
, files.content.write
, files.content.read
, sharing.write
and sharing.read
permission for your app.To securely configure the Dropbox storage provider, add the following entry to your project's local.properties file:
DROPBOX_CLIENT_ID=<YOUR_DROPBOX_APP_KEY>
To interact with the Dropbox storage provider, start by initializing the OMH Auth Client. Once the authentication client is set up, you can then initialize the OMH Storage Client.
import DropboxAuthClient from '@openmobilehub/auth-dropbox';
import { DropboxStorageClient } from '@openmobilehub/storage-dropbox';
const scopes = [
'account_info.read',
'files.metadata.read',
'files.content.write',
'files.content.read',
'sharing.write',
'sharing.read',
];
await DropboxAuth.initialize({
android: { scopes },
ios: {
scopes,
clientId: '<YOUR_DROPBOX_APP_KEY>',
clientSecret: '<YOUR_DROPBOX_APP_SECRET>',
redirectUrl: '<YOUR_REDIRECT_URL>',
},
});
const dropboxStorageClient = new DropboxStorageClient(DropboxAuth);
Interacting with the Dropbox storage provider follows the same pattern as other storage providers since they all implement the IStorageClient
interface. This uniformity ensures consistent functionality across different storage providers, so you won’t need to learn new methods regardless of the storage provider you choose! For a comprehensive list of available methods, refer to the Getting Started guide.
:::warning[CAVEATS]
When updating a file, if the new file has a different name than the updated file, two additional versions might sometimes appear in the system. One version comes from updating the content of the file, and the other comes from updating the file name.
The createPermission
method returns null
when a permission is successfully created.
The updatePermission
method returns null
when a permission is successfully updated.
The getWebUrl
method requires the folder to be a shared folder to return a web URL.
The getFilePermissions
method requires the folder to be a shared folder to retrieve any permissions, including owner
permission.
:::
FAQs
Dropbox integration for React Native OMH Storage. Offers a lightweight bridge to integrate your app with Dropbox's cloud storage using the official SDK and API.
The npm package @openmobilehub/storage-dropbox receives a total of 18 weekly downloads. As such, @openmobilehub/storage-dropbox popularity was classified as not popular.
We found that @openmobilehub/storage-dropbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.
Research
/Security News
The Socket Threat Research Team uncovered a coordinated campaign that floods the Chrome Web Store with 131 rebranded clones of a WhatsApp Web automation extension to spam Brazilian users.