mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-26 03:35:19 +00:00
On the dashboard, when uploading a folder, if files from that folder are not successfully added, the count would still say they are there For example, If you're using Google Drive, and upload a folder with 3 images and 2 mp3 files. If you also have a restriction set to only allow images, Dashboard would still read something like "5 Files Added", even though only 3 would be there. I resolved this by making the `addFile` method in the `provider-views` package return a boolean value based on whether or not the file was added successfully. I then created a count variable with the `addFolder` method and added to that count for every successful addition. Using that count instead of the total count of files in the folder fixes this problem Resolves #2038 |
||
|---|---|---|
| .. | ||
| src | ||
| types | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
@uppy/provider-views
View library for Uppy remote provider plugins.
Uppy is being developed by the folks at Transloadit, a versatile file encoding service.
Example
const Plugin = require('@uppy/core/lib/plugin')
const ProviderViews = require('@uppy/provider-views')
class GoogleDrive extends Plugin {
constructor () { /* snip */ }
install () {
this.view = new ProviderViews(this)
// snip
}
onFirstRender () {
return this.view.getFolder('root', '/')
}
render (state) {
return this.view.render(state)
}
}
Installation
Unless you are creating a custom provider plugin, you do not need to install this.
$ npm install @uppy/provider-views --save