UNPKG

1.39 kBMarkdownView Raw
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<a href="https://travis-ci.org/transloadit/uppy"><img src="https://img.shields.io/travis/transloadit/uppy/master.svg?style=flat-square" alt="Build Status"></a>
7
8View library for Uppy remote provider plugins.
9
10Uppy is being developed by the folks at [Transloadit](https://transloadit.com), a versatile file encoding service.
11
12## Example
13
14```js
15const Plugin = require('@uppy/core/lib/plugin')
16const ProviderViews = require('@uppy/provider-views')
17
18class GoogleDrive extends Plugin {
19 constructor () { /* snip */ }
20 install () {
21 this.view = new ProviderViews(this)
22 // snip
23 }
24
25 onFirstRender () {
26 return this.view.getFolder('root', '/')
27 }
28
29 render (state) {
30 return this.view.render(state)
31 }
32}
33```
34
35## Installation
36
37> Unless you are creating a custom provider plugin, you do not need to install this.
38
39```bash
40$ npm install @uppy/provider-views --save
41```
42
43<!-- Undocumented currently
44## Documentation
45
46Documentation for this plugin can be found on the [Uppy website](https://uppy.io/docs/DOC_PAGE_HERE).
47-->
48
49## License
50
51[The MIT License](./LICENSE).