1 | # @uppy/provider-views
|
2 |
|
3 | <img src="https://uppy.io/images/logos/uppy-dog-head-arrow.svg" width="120" alt="Uppy logo: a superman puppy in a pink suit" align="right">
|
4 |
|
5 | <a href="https://www.npmjs.com/package/@uppy/provider-views"><img src="https://img.shields.io/npm/v/@uppy/provider-views.svg?style=flat-square"></a>
|
6 | <img src="https://github.com/transloadit/uppy/workflows/Tests/badge.svg" alt="CI status for Uppy tests"> <img src="https://github.com/transloadit/uppy/workflows/Companion/badge.svg" alt="CI status for Companion tests"> <img src="https://github.com/transloadit/uppy/workflows/End-to-end%20tests/badge.svg" alt="CI status for browser tests">
|
7 |
|
8 | View library for Uppy remote provider plugins.
|
9 |
|
10 | Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.
|
11 |
|
12 | ## Example
|
13 |
|
14 | ```js
|
15 | import Plugin from '@uppy/core/lib/plugin'
|
16 | import { ProviderViews } from '@uppy/provider-views'
|
17 |
|
18 | class GoogleDrive extends UIPlugin {
|
19 | install () {
|
20 | this.view = new ProviderViews(this)
|
21 | // snip
|
22 | }
|
23 |
|
24 | onFirstRender () {
|
25 | return Promise.all([
|
26 | this.provider.fetchPreAuthToken(),
|
27 | this.view.getFolder('root', '/'),
|
28 | ])
|
29 | }
|
30 |
|
31 | render (state) {
|
32 | return this.view.render(state)
|
33 | }
|
34 | }
|
35 | ```
|
36 |
|
37 | ## Installation
|
38 |
|
39 | > Unless you are creating a custom provider plugin, you do not need to install this.
|
40 |
|
41 | ```bash
|
42 | $ npm install @uppy/provider-views
|
43 | ```
|
44 |
|
45 |
|
46 | ## Documentation
|
47 |
|
48 | Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/DOC_PAGE_HERE).
|
49 | -->
|
50 |
|
51 | ## License
|
52 |
|
53 | [The MIT License](./LICENSE).
|