|
@@ -81,6 +81,41 @@ new Uppy()
|
|
|
.use(OneDrive, { companionUrl: 'https://your-companion.com' });
|
|
|
```
|
|
|
|
|
|
+### Use with Transloadit
|
|
|
+
|
|
|
+```js
|
|
|
+import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit';
|
|
|
+import OneDrive from '@uppy/onedrive';
|
|
|
+
|
|
|
+uppy.use(OneDrive, {
|
|
|
+ companionUrl: COMPANION_URL,
|
|
|
+ companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+You may also hit rate limits, because the OAuth application is shared between
|
|
|
+everyone using Transloadit.
|
|
|
+
|
|
|
+To solve that, you can use your own OAuth keys with Transloadit’s hosted
|
|
|
+Companion servers by using Transloadit Template Credentials. [Create a Template
|
|
|
+Credential][template-credentials] on the Transloadit site. Select “Companion
|
|
|
+OAuth” for the service, and enter the key and secret for the provider you want
|
|
|
+to use. Then you can pass the name of the new credentials to that provider:
|
|
|
+
|
|
|
+```js
|
|
|
+import { COMPANION_URL, COMPANION_ALLOWED_HOSTS } from '@uppy/transloadit';
|
|
|
+import OneDrive from '@uppy/onedrive';
|
|
|
+
|
|
|
+uppy.use(OneDrive, {
|
|
|
+ companionUrl: COMPANION_URL,
|
|
|
+ companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
|
|
|
+ companionKeysParams: {
|
|
|
+ key: 'YOUR_TRANSLOADIT_API_KEY',
|
|
|
+ credentialsName: 'my_companion_dropbox_creds',
|
|
|
+ },
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
### Use in Companion
|
|
|
|
|
|
To sign up for API keys, go to the
|
|
@@ -100,15 +135,14 @@ If you are using Transloadit hosted Companion:
|
|
|
https://api2.transloadit.com/companion/onedrive/redirect
|
|
|
```
|
|
|
|
|
|
-Go to the “Manifest” tab, and find the `"signInAudience"` key.
|
|
|
-Change it to `"signInAudience": "AzureADandPersonalMicrosoftAccount"`, and click
|
|
|
-“Save”.
|
|
|
+Go to the “Manifest” tab, and find the `"signInAudience"` key. Change it to
|
|
|
+`"signInAudience": "AzureADandPersonalMicrosoftAccount"`, and click “Save”.
|
|
|
|
|
|
-Go to the “Overview” tab.
|
|
|
-Copy the `Application (client) ID` field - this will be your Oauth client ID.
|
|
|
+Go to the “Overview” tab. Copy the `Application (client) ID` field - this will
|
|
|
+be your Oauth client ID.
|
|
|
|
|
|
-Go to the “Certificates & secrets” tab, and click “+ New client secret”.
|
|
|
-Copy the `Value` field - this will be your OAuth client secret.
|
|
|
+Go to the “Certificates & secrets” tab, and click “+ New client secret”. Copy
|
|
|
+the `Value` field - this will be your OAuth client secret.
|
|
|
|
|
|
Configure the OneDrive key and secret in Companion. With the standalone
|
|
|
Companion server, specify environment variables:
|
|
@@ -185,3 +219,6 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
```
|
|
|
+
|
|
|
+[template-credentials]:
|
|
|
+ https://transloadit.com/docs/#how-to-create-template-credentials
|