Browse Source

Merge remote-tracking branch 'origin/master'

Artur Paikin 7 years ago
parent
commit
c5fe6cf7df

+ 14 - 8
CHANGELOG.md

@@ -48,28 +48,33 @@ What we need to do to release Uppy 1.0
 - [ ] feature: restrictions: by size, number of files, file type [in progress]
 - [ ] feature: improved UI for Provider, Google Drive and Instagram, grid/list views
 - [ ] feature: finish the direct-to-s3 upload plugin and test it with the flow to then upload to :transloadit: afterwards. This is because this might influence the inner flow of the plugin architecture quite a bit
-- [ ] QA: test how everything works together: user experience from `npm install` to production build with Webpack, using in React/Redux environment
-- [ ] QA: test uppy server with multiple connections, different setups, large files
+- [ ] feature: Uppy should work well with React/Redux. React (Native)
+- [ ] feature: preset for Transloadit that mimics jQuery SDK
+- [ ] QA: test how everything works together: user experience from `npm install` to production build with Webpack, using in React/Redux environment (npm pack)
+- [ ] QA: test uppy server. benchmarks / stress test. multiple connections, different setups, large files. add metrics to Librato
+- [ ] uppy-server: add uppy-server to main API service to scale it horizontally. for the standalone server, we could write the script to support multiple clusters. Not sure how required or neccessary this may be for Transloadit's API service.
 - [ ] QA: test in multiple browsers and mobile devices, fix bugs
 - [ ] QA: test with real screen reader to identify accessibility problems
 - [ ] ui: refine UI, neat things up (if that’s even a word)
 - [ ] refactoring: reduce size where possible, like, socket.io --> websockets (saves 20KB)
 - [ ] refactoring: possibly add CSS-in-JS
 - [ ] refactoring: possibly switch from Yo-Yo to Preact, because its more stable, solves a few issues we are struggling with (like onload/onunload being weird in yo-yo) and mature, “new standard”, larger community
-- [ ] refactoring: possibly differentiate UI plugins from logic plugins, so that, say Tus plugin doesn’t include rendering stuff
 - [ ] refactoring: webcam plugin
 - [ ] refactoring: clean up code everywhere
 - [ ] docs: on using plugins, all options, list of plugins, i18n
-- [ ] uppy-server: add uppy-server to main API service to scale it horizontally. for the standalone server, we could write the script to support multiple clusters. Not sure how required or neccessary this may be for Transloadit's API service.
-- [ ] uppy-server: add uppy-server metrics to Librato
-- [ ] uppy-server: Better error handling
-- [ ] uppy-server: General cleanup (remove unused code. etc)
+- [ ] uppy-server: better error handling, general cleanup (remove unused code. etc)
+- [ ] uppy-server: security audit
+
+maybe later:
+
+- [ ] refactoring: possibly differentiate UI plugins from logic plugins, so that, say Tus plugin doesn’t include rendering stuff
 
 ## 0.18.0
 
 - [ ] test: add https://github.com/pa11y/pa11y for automated accessibility testing (@arturi)
 - [ ] webcam: look into simplifying / improving webcam plugin (@arturi, @goto-bus-stop)
 - [ ] core: add error in file progress state? (@arturi)
+- [ ] uppy-server: add uppy-server metrics to Librato (@ifedapoolarewaju)
 
 ## 0.17.0
 
@@ -89,7 +94,7 @@ To be released: 2017-06-30
 - [ ] test: add tests for `npm install uppy` and running in different browsers, the real world use case (@arturi)
 - [ ] uploaders: add direct-to-s3 upload plugin and test it with the flow to then upload to transloadit (@goto-bus-stop)
 - [ ] uppy/uppy-server: Make a barely working Instagram Plugin (@ifedapoolarewaju / #21)
-- [ ] uppy/uppy-server: some file types cannot be downloaded/uploaded on google drive (e.g google docs). How to handle that? (@ifedapoolarewaju)
+- [x] uppy/uppy-server: some file types cannot be downloaded/uploaded on google drive (e.g google docs). How to handle that? (@ifedapoolarewaju)
 - [x] uppy: fix google drive uploads on mobile (double click issue) (@arturi)
 - [ ] website: new demo video / gif (@arturi)
 - [x] core: add nanoraf https://github.com/yoshuawuyts/choo/pull/135/files?diff=unified (@goto-bus-stop, @arturi)
@@ -101,6 +106,7 @@ To be released: 2017-06-30
 - [x] statusbar: work towards extracting StatusBar to a separate plugin, bundle that with Dashboard? (@goto-bus-stop, @arturi)
 - [x] tus/uppy-server: Support metadata in remote tus uploads (@ifedapoolarewaju, @goto-bus-stop / #210)
 - [x] uppy/uppy-server: allow google drive/dropbox non-tus (i.e multipart) remote uploads (@arturi, @ifedapoolarewaju / #205)
+- [x] server: configurable server port (@ifedapoolarewaju)
 
 ## 0.16.2 - 2017-05-31
 

+ 3 - 1
src/plugins/GoogleDrive/index.js

@@ -88,7 +88,9 @@ module.exports = class Google extends Plugin {
   }
 
   getItemSubList (item) {
-    return item.items
+    return item.items.filter((i) => {
+      return this.isFolder(i) || !i.mimeType.startsWith('application/vnd.google')
+    })
   }
 
   getItemName (item) {

+ 7 - 1
src/plugins/Multipart.js

@@ -13,7 +13,8 @@ module.exports = class Multipart extends Plugin {
     const defaultOptions = {
       fieldName: 'files[]',
       responseUrlFieldName: 'url',
-      bundle: true
+      bundle: true,
+      headers: {}
     }
 
     // Merge default options with the ones set by user
@@ -87,6 +88,11 @@ module.exports = class Multipart extends Plugin {
       })
 
       xhr.open('POST', this.opts.endpoint, true)
+
+      Object.keys(this.opts.headers).forEach((header) => {
+        xhr.setRequestHeader(header, this.opts.headers[header])
+      })
+
       xhr.send(formPost)
 
       this.core.emitter.on('core:upload-cancel', (fileID) => {

+ 1 - 1
src/scss/_provider.scss

@@ -331,7 +331,7 @@
   text-align: left;
 }
 
-.BrowserTable-row.is-active {
+.BrowserTable-row:hover {
   background-color: #eee;
 }
 

+ 1 - 1
src/uppy-base/src/plugins/Provider.js

@@ -21,7 +21,7 @@ module.exports = class Provider {
       credentials: 'include',
       headers: {
         'Accept': 'application/json',
-        'Content-Type': 'application.json'
+        'Content-Type': 'application/json'
       }
     })
     .then((res) => {