openmobilehub / react-native-omh-storage

https://openmobilehub.github.io/react-native-omh-storage/
Apache License 2.0
7 stars 0 forks source link


React Native OMH Storage

NPM downloads NPM version License

Chat on Discord Follow on Twitter


React Native OMH Storage streamlines connecting your React Native app to various cloud storage providers by providing lightweight bridges to native OMH Storage SDKs on both iOS and Android. It supports both Google Mobile Services (GMS) and non-GMS configurations, making it easy to incorporate Google Drive, OneDrive and Dropbox storage providers.

Features

A single codebase, running seamlessly on any device

For instance, the following screenshots showcase multiple devices with Android, both with GMS and Non-GMS, and iOS. The same app works without changing a single line of code, supporting multiple map provider implementations (Google Drive, OneDrive and Dropbox).

Android:

| Google Drive | Dropbox | OneDrive | |----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| | File listing | | | | |

iOS:

| Google Drive | Dropbox | OneDrive | |------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------| | File listing | | | | |
Show more Android:
| Google Drive | Dropbox | OneDrive | |-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | File searching | | | | | | File creation | | | | | | File update | | | | | | File deletion | | | | | | File upload | | | | | | File download | | | | | | File metadata | | | | | | File versioning | | | | | | File permissions | | | | |
iOS:
| Google Drive | Dropbox | OneDrive | |-------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| | File searching | | | | | | File creation | | | | | | File update | | | | | | File deletion | | | | | | File upload | | | | | | File download | | | | | | File metadata | | | | | | File versioning | | | | | | File permissions | | | | |

OMH Storage Modules

This is the main directory of the mono-repo for React Native OMH Storage. If you're searching for a particular package, please click on the corresponding package link below.

Documentation

Supported functionality

Features Google Drive (GMS) Google Drive (non-GMS) OneDrive Dropbox
File listing βœ… βœ… βœ… βœ…
File searching βœ… βœ… βœ… βœ…
Folder creation βœ… βœ… βœ… βœ…
File creation (by mime type) βœ… βœ… ❌ ❌
File creation (by extension) ❌ ❌ βœ… βœ…
File update βœ… βœ… βœ… βœ…
File deletion βœ… βœ… βœ… βœ…
File permanent deletion βœ… βœ… ❌ ❌
File upload βœ… βœ… βœ… βœ…
File download βœ… βœ… βœ… βœ…
File export βœ… βœ… ❌ ❌
File metadata βœ… βœ… 🟨 🟨
File versioning βœ… βœ… βœ… βœ…
File permissions 🟨 🟨 🟨 🟨
File URL βœ… βœ… βœ… βœ…

File metadata

Show details [`File`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/classes/File#properties) | Property | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | ------------ | :----------------: | :--------------------: | :------: | :-----: | | id | βœ… | βœ… | βœ… | βœ… | | name | βœ… | βœ… | βœ… | βœ… | | createdTime | βœ… | βœ… | 🟨 | 🟨 | | modifiedTime | βœ… | βœ… | βœ… | βœ… | | parentId | βœ… | βœ… | βœ… | βœ… | | mimeType | βœ… | βœ… | βœ… | βœ… | | extension | βœ… | βœ… | βœ… | βœ… | | size | βœ… | βœ… | βœ… | βœ… | > **OneDrive, Dropbox**: On Android, the `createdTime` property cannot be retrieved for files. [`Folder`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/classes/Folder#properties) | Property | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | ------------ | :----------------: | :--------------------: | :------: | :-----: | | id | βœ… | βœ… | βœ… | βœ… | | name | βœ… | βœ… | βœ… | βœ… | | createdTime | βœ… | βœ… | 🟨 | ❌ | | modifiedTime | βœ… | βœ… | βœ… | ❌ | | parentId | βœ… | βœ… | βœ… | βœ… | > **OneDrive**: On Android, the `createdTime` property cannot be retrieved for folders.

File permissions

Show details [`Permission#properties`](https://openmobilehub.github.io/react-native-omh-storage/api/core/src/classes/Permission#properties) | Property | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | ----------- | :----------------: | :--------------------: | :------: | :-----: | | id | βœ… | βœ… | βœ… | 🟨 | | role | βœ… | βœ… | βœ… | βœ… | | isInherited | 🟨 | 🟨 | βœ… | βœ… | | identity | βœ… | βœ… | βœ… | βœ… | > **Google Drive**: The `isInherited` property is available only for items in shared drives. > **Dropbox**: The `id` corresponds to the underlying identity ID. [`Permission#extended-by`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/classes/Permission#extended-by) | Type | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | ----------- | :----------------: | :--------------------: | :------: | :-----: | | User | βœ… | βœ… | βœ… | βœ… | | Group | βœ… | βœ… | βœ… | βœ… | | Domain | βœ… | βœ… | ❌ | ❌ | | Anyone | βœ… | βœ… | ❌ | ❌ | | Device | ❌ | ❌ | βœ… | ❌ | | Application | ❌ | ❌ | βœ… | ❌ | [`UserPermission`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/classes/UserPermission#properties) | Property | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | -------------- | :----------------: | :--------------------: | :------: | :-----: | | id | ❌ | ❌ | βœ… | βœ… | | displayName | βœ… | βœ… | βœ… | 🟨 | | emailAddress | βœ… | βœ… | ❌ | βœ… | | expirationTime | βœ… | βœ… | βœ… | ❌ | | deleted | βœ… | βœ… | ❌ | ❌ | | photoLink | βœ… | βœ… | ❌ | ❌ | | pendingOwner | ❌ | βœ… | ❌ | ❌ | > **Dropbox**: Invited users who do not have a Dropbox account will not have a `displayName`. [`GroupPermission`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/classes/GroupPermission#properties) | Property | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | -------------- | :----------------: | :--------------------: | :------: | :-----: | | id | ❌ | ❌ | βœ… | βœ… | | displayName | βœ… | βœ… | βœ… | βœ… | | emailAddress | βœ… | βœ… | ❌ | ❌ | | expirationTime | βœ… | βœ… | βœ… | ❌ | | deleted | βœ… | βœ… | ❌ | ❌ | [`PermissionRole`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/type-aliases/PermissionRole) | Role | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | --------- | :----------------: | :--------------------: | :------: | :-----: | | owner | βœ… | βœ… | βœ… | βœ… | | writer | βœ… | βœ… | βœ… | 🟨 | | commenter | βœ… | βœ… | ❌ | βœ… | | reader | βœ… | βœ… | βœ… | 🟨 | > **Dropbox**: > > - While the `reader` role is documented in the API, Dropbox does not support granting this role. Attempting to do so will throw an exception with the user message: `viewer_no_comment isn’t yet supported`. > - Dropbox also does not support granting the `writer` role for uploaded files. Any attempt will result in an exception with the user message: `You don’t have permission to perform this action`. [`PermissionRecipient`](https://openmobilehub.github.io/react-native-omh-storage/docs/api/core/src/type-aliases/PermissionRecipient) | Type | Google Drive (GMS) | Google Drive (non-GMS) | OneDrive | Dropbox | | ------------ | :----------------: | :--------------------: | :------: | :-----: | | user | βœ… | βœ… | βœ… | βœ… | | group | βœ… | βœ… | βœ… | ❌ | | domain | βœ… | βœ… | ❌ | ❌ | | anyone | βœ… | βœ… | ❌ | ❌ | | objectId | ❌ | ❌ | βœ… | βœ… | | alias | ❌ | ❌ | βœ… | ❌ | > **Dropbox**: To invite a group, use `objectId` and provide the group ID.

Contributing

License