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