mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
instead of window.opener - it is more robust inspired by #4110 closes #6246 closes #4107 Biggest caveat: In cases where window.opener is null (Dropbox), the auth window will not be auto closed (I don't know how to fix that). It will show the user a message "Authentication successful. You may now close this page." https://github.com/transloadit/uppy/pull/6248/changes#diff-ef5b69c4ab5b83168eaba6f57047bb07c53e3a426f375b42fcb32d79c746872cR22 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Prakash <qxprakash@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .npmignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| turbo.json | ||
@uppy/companion-client
Client library for communication with Companion. Intended for use in Uppy plugins.
Uppy is being developed by the folks at Transloadit, a versatile file encoding service.
Example
import Uppy from '@uppy/core'
import { Provider, RequestClient, Socket } from '@uppy/companion-client'
const uppy = new Uppy()
const client = new RequestClient(uppy, {
companionUrl: 'https://uppy.mywebsite.com/',
})
client.get('/drive/list').then(() => {})
const provider = new Provider(uppy, {
companionUrl: 'https://uppy.mywebsite.com/',
provider: providerPluginInstance,
})
provider.checkAuth().then(() => {})
const socket = new Socket({ target: 'wss://uppy.mywebsite.com/' })
socket.on('progress', () => {})
Installation
Unless you are writing a custom provider plugin, you do not need to install this.
$ npm install @uppy/companion-client
Documentation
Documentation for this plugin can be found on the Uppy website.