Quellcode durchsuchen

Merge pull request #704 from transloadit/docs/improvements

[WIP] Docs: typos, fixes and improvements following Tim’s  feedback
Artur Paikin vor 7 Jahren
Ursprung
Commit
3080b5262e

+ 1 - 1
src/plugins/GoldenRetriever/index.js

@@ -4,7 +4,7 @@ const IndexedDBStore = require('./IndexedDBStore')
 const MetaDataStore = require('./MetaDataStore')
 
 /**
-* The Golden Retriever plugin — restores selected files and resumes uploads
+* The GoldenRetriever plugin — restores selected files and resumes uploads
 * after a closed tab or a browser crash!
 *
 * Uses localStorage, IndexedDB and ServiceWorker to do its magic, read more:

+ 0 - 1
src/react/DashboardModal.js

@@ -60,7 +60,6 @@ DashboardModal.propTypes = {
   plugins: PropTypes.arrayOf(PropTypes.string),
   maxWidth: PropTypes.number,
   maxHeight: PropTypes.number,
-  semiTransparent: PropTypes.bool,
   showProgressDetails: PropTypes.bool,
   hideUploadButton: PropTypes.bool,
   note: PropTypes.string,

+ 0 - 5
src/scss/_dashboard.scss

@@ -53,11 +53,6 @@
   min-height: 300px;
 }
 
-.uppy-Dashboard--semiTransparent .uppy-Dashboard-inner {
-  background-color: rgba($color-white, 0.8);
-  -webkit-backdrop-filter: saturate(180%) blur(20px);
-}
-
 .uppy-Dashboard--modal .uppy-Dashboard-inner {
   position: fixed;
   top: 0;

+ 3 - 3
website/src/_posts/2017-08-0.18.md

@@ -1,5 +1,5 @@
 ---
-title: "Uppy 0.18: Dogumentation and The Golden Retriever"
+title: "Uppy 0.18: Dogumentation and The GoldenRetriever"
 image: "http://uppy.io/images/blog/0.18/golden-retriever.jpg"
 date: 2017-09-15
 author: arturi
@@ -14,9 +14,9 @@ Hi! Another month — a new Uppy release 🎉
 
 Documentation for Uppy has been re-written, and now features chapters on Uppy’s settings and API, using various plugins, and running Uppy Server. Check it out: https://uppy.io/docs/. More chapters to come!
 
-## The Golden Retriever
+## The GoldenRetriever
 
-The Golden Retriever has been released as a public beta. For details, please refer to the previous post, [The Golden Retriever: Making uploads survive browser crashes](https://uppy.io/blog/2017/07/golden-retriever/), but the gist is: when enabled, this plugin will save uppy-state to localStorage on every change, and then if your browser crashes, or you accidentaly navigate away from a tab,later when you return, your uploads will resume like nothing happened. Spoiler: it uses Service Workers and IndexedDB.
+The GoldenRetriever has been released as a public beta. For details, please refer to the previous post, [The GoldenRetriever: Making uploads survive browser crashes](https://uppy.io/blog/2017/07/golden-retriever/), but the gist is: when enabled, this plugin will save uppy-state to localStorage on every change, and then if your browser crashes, or you accidentaly navigate away from a tab,later when you return, your uploads will resume like nothing happened. Spoiler: it uses Service Workers and IndexedDB.
 
 <img class="border" src="/images/blog/0.18/golden-retriever.jpg">
 

+ 1 - 1
website/src/_posts/2017-10-0.20.md

@@ -141,7 +141,7 @@ We'll hopefully make that require path easier to remember in the future :)
 
 ## Misc good stuff
 
-- The Golden Retriever now detects a serviceWorker registration automatically—it's no longer necessary to emit an `core:sw-file-ready` event.
+- The GoldenRetriever now detects a serviceWorker registration automatically—it's no longer necessary to emit an `core:sw-file-ready` event.
 - Request headers are now configurable in the AWS S3 plugin.
 - A new `setPluginState` allows plugins to set state scoped to the plugin.
 - Some unused code was removed 🎉

+ 2 - 2
website/src/_posts/2017-12-0.22.md

@@ -102,9 +102,9 @@ uppy.use(Form, {
 
 Read [more about the Form plugin](https://uppy.io/docs/form/) in docs.
 
-## Encoding support in Golden Retriever
+## Encoding support in GoldenRetriever
 
-Our browser crash / page refresh restore plugin `Golden Retriever` (read [more about it](https://uppy.io/docs/golden-retriever/)) now supports correctly restoring [Transloadit](https://transloadit.com) assemblies!
+Our browser crash / page refresh restore plugin `GoldenRetriever` (read [more about it](https://uppy.io/docs/golden-retriever/)) now supports correctly restoring [Transloadit](https://transloadit.com) assemblies!
 
 Also, we’ve fixed restoring from paused state. Now uploads will remain paused and not get out of sync.
 

+ 5 - 3
website/src/docs/contributing.md

@@ -16,7 +16,7 @@ cd uppy
 npm install
 ```
 
-Our website's examples section is also our playground, read "Website Development"'s "Local Previews" section to get up and running.
+Our website’s examples section is also our playground, please read [Local Previews](#Local-Previews) section to get up and running.
 
 ## Tests
 
@@ -39,13 +39,15 @@ After you’ve installed and launched the selenium standalone server, run:
 
 `npm run test:acceptance:local`
 
+These tests are also run automatically on Travis builds with [SauceLabs](https://saucelabs.com/) cloud service using different OSes.
+
 ## Website Development
 
-We keep the [uppy.io](http://uppy.io) website in `./website` for so it's easy to keep docs & code in sync as we're still iterating at high velocity. For those reading this screaming murder, [HashiCorp does this](https://github.com/hashicorp/terraform/tree/master/website) for all their projects, and it's working well for them on a scale vastly more impressive than Uppy's.
+We keep the [uppy.io](http://uppy.io) website in `./website` so it’s easy to keep docs & code in sync as we’re still iterating at high velocity.
 
 The site is built with [Hexo](http://hexo.io/), and Travis automatically deploys this onto GitHub Pages (it overwrites the `gh-pages` branch with Hexo's build at every change to `master`). The content is written in Markdown and located in `./website/src`. Feel free to fork & hack!
 
-Even though bundled in this repo, the website is regarded as a separate project. So it has its own `package.json` and we aim keep the surface where the two projects interface as small as possible. `./website/update.js` is called during website builds to inject the Uppy knowledge into the site.
+Even though bundled in this repo, the website is regarded as a separate project. So it has its own `package.json` and we aim to keep the surface where the two projects interface as small as possible. `./website/update.js` is called during website builds to inject the Uppy knowledge into the site.
 
 ### Local Previews
 

+ 5 - 6
website/src/docs/dashboard.md

@@ -25,7 +25,6 @@ uppy.use(Dashboard, {
   plugins: [],
   maxWidth: 750,
   maxHeight: 550,
-  semiTransparent: false,
   showProgressDetails: false,
   hideUploadButton: false,
   hideProgressAfterFinish: false,
@@ -115,7 +114,7 @@ Optionally specify a string of text that explains something about the upload for
 
 ### `metaFields: []`
 
-An array of UI field objects that will be shown when a user clicks “edit” button on that file. Each object requires:
+An array of UI field objects that will be shown when a user clicks the “edit” button on that file. Each object requires:
 
 - `id`, the name of the meta field.
 - `name`, the label shown in the interface.
@@ -131,11 +130,11 @@ An array of UI field objects that will be shown when a user clicks “edit” bu
 })
 ```
 
-Note that this meta data will only be set to a file if it’s entered by user. If you want to set certain default meta field to each file regardless of user actions, set [`meta` in Uppy options](/docs/uppy/#meta).
+Note that this meta data will only be set to a file if it’s entered by the user. If you want to set certain meta field to each file regardless of user actions, set [`meta` in Uppy options](/docs/uppy/#meta).
 
 ### `closeModalOnClickOutside: false`
 
-Set to true to automatically close the modal when the user clicks outside it.
+Set to true to automatically close the modal when the user clicks outside of it.
 
 ### `disablePageScrollWhenModalOpen: true`
 
@@ -143,11 +142,11 @@ By default when Dashboard modal is open, it will disable page scrolling, so when
 
 ### `disableStatusBar: false`
 
-Dashboard ships with `StatusBar` plugin that shows upload progress and pause/resume/cancel buttons. If you want, you can disable the StatusBar to provide your custom solution.
+Dashboard ships with the `StatusBar` plugin that shows upload progress and pause/resume/cancel buttons. If you want, you can disable the StatusBar to provide your custom solution.
 
 ### `disableInformer: false`
 
-Dashboard ships with `Informer` plugin that notifies when the browser is offline, or when it’s time to smile if `Webcam` is taking a picture. If you want, you can disable the Informer and/or provide your custom solution.
+Dashboard ships with the `Informer` plugin that notifies when the browser is offline, or when it’s time to smile if `Webcam` is taking a picture. If you want, you can disable the Informer and/or provide your custom solution.
 
 ### `disableThumbnailGenerator: false`
 

+ 5 - 1
website/src/docs/dragdrop.md

@@ -5,7 +5,7 @@ title: "DragDrop"
 permalink: docs/dragdrop/
 ---
 
-DragDrop renders a simple Drag and Drop area for file selection. Useful when you only want local device as a file source, don’t need file previews and metadata editing UI, and the [Dashboard](/docs/dashboard/) feels like an overkill.
+DragDrop renders a simple Drag and Drop area for file selection. Useful when you only want the local device as a file source, don’t need file previews and metadata editing UI, and the [Dashboard](/docs/dashboard/) feels like an overkill.
 
 [Try it live](/examples/dragdrop/)
 
@@ -26,3 +26,7 @@ uppy.use(DragDrop, {
 })
 ```
 
+### `note: null`
+
+Optionally specify a string of text that explains something about the upload for the user. This is a place to explain `restrictions` that are put in place. For example: `'Images and video only, 2–3 files, up to 1 MB'`.
+

+ 1 - 1
website/src/docs/form.md

@@ -25,7 +25,7 @@ DOM element or CSS selector for the form element. Required for the plugin to wor
 
 ### `getMetaFromForm: true`
 
-Whether to extract metadata from the form.
+Whether to extract metadata from the form. When set to true, `Form` plugin will extract all fields from a `<form>` element before upload begins. Those fields will then be added to global `uppy.state.meta` and each file’s meta, and appended as (meta)data to the upload in an object with `[file input name attribute]` -> `[file input value]` key/values.
 
 ### `addResultToForm: true`
 

+ 6 - 4
website/src/docs/golden-retriever.md

@@ -1,13 +1,13 @@
 ---
-title: "Golden Retriever"
+title: "GoldenRetriever"
 type: docs
 permalink: docs/golden-retriever/
 order: 40
 ---
 
-Golden Retriever plugin saves selected files in your browser cache (Local Storage for metadata, then Service Worker for all blobs + IndexedDB for small blobs), so that if the browser crashes, Uppy can restore everything and continue uploading like nothing happened. Read more about it [on the blog](https://uppy.io/blog/2017/07/golden-retriever/).
+The GoldenRetriever plugin saves selected files in your browser cache (Local Storage for metadata, then Service Worker for all blobs + IndexedDB for small blobs), so that if the browser crashes, Uppy can restore everything and continue uploading like nothing happened. Read more about it [on the blog](https://uppy.io/blog/2017/07/golden-retriever/).
 
-1\. Bundle your own service worker `sw.js` file with Uppy Golden Retriever’s service worker. If you’re using Browserify, just bundle it separately, for Webpack there is a plugin [serviceworker-webpack-plugin](https://github.com/oliviertassinari/serviceworker-webpack-plugin).
+1\. Bundle your own service worker `sw.js` file with Uppy GoldenRetriever’s service worker. If you’re using Browserify, just bundle it separately, for Webpack there is a plugin [serviceworker-webpack-plugin](https://github.com/oliviertassinari/serviceworker-webpack-plugin).
 
 ```js
 // sw.js
@@ -26,7 +26,7 @@ uppy.run()
 
 if ('serviceWorker' in navigator) {
   navigator.serviceWorker
-    .register('/sw.js') // path to your bundled service worker with Golden Retriever service worker
+    .register('/sw.js') // path to your bundled service worker with GoldenRetriever service worker
     .then((registration) => {
       console.log('ServiceWorker registration successful with scope: ', registration.scope)
     })
@@ -35,3 +35,5 @@ if ('serviceWorker' in navigator) {
     })
 }
 ```
+
+Voila, that’s it. Happy retrieving!

+ 1 - 1
website/src/docs/index.md

@@ -31,7 +31,7 @@ uppy.on('complete', (result) => {
 
 Drag and Drop, Webcam, basic file manipulation (adding metadata), uploading via tus resumable uploads or XHR/Multipart is all possible using just the uppy client module.
 
-Adding [Uppy Server](/docs/server/) to the mix enables remote sources such as Instagram, Google Drive, Dropbox, and direct urls. Uploads from remote sources are handled server-to-server, so a 5 GB video won’t be eating into your mobile data plan. Files are removed from Uppy Server after an upload is complete, or after a reasonable timeout. Access tokens also don’t stick around for long, for security reasons.
+Adding [Uppy Server](/docs/server/) to the mix enables remote sources such as Instagram, Google Drive, Dropbox, and remote urls. Uploads from remote sources are handled server-to-server, so a 5 GB video won’t be eating into your mobile data plan. Files are removed from Uppy Server after an upload is complete, or after a reasonable timeout. Access tokens also don’t stick around for long, for security reasons.
 
 ## Installation
 

+ 3 - 3
website/src/docs/plugins.md

@@ -78,11 +78,11 @@ uppy.use(GoogleDrive, {target: Dashboard, host: 'http://localhost:3020'})
 
 ### `replaceTargetContent: false`
 
-By default Uppy will append any UI to a DOM element, if such element is specified as a `target`. This default is the least dangerous option. However, there might be cases when you’d want to clear the container element before place Uppy UI in there (for example, to provide a fallback `<form>` that will be shown if Uppy or JavaScript is not loaded/supported on the page). Set `replaceTargetContent: true` to clear the `target` before appending.
+By default Uppy will append any UI to a DOM element, if such element is specified as a `target`. This default is the least dangerous option. However, there might be cases when you’d want to clear the container element before placing Uppy UI in there (for example, to provide a fallback `<form>` that will be shown if Uppy or JavaScript is not loaded/supported on the page). Set `replaceTargetContent: true` to clear the `target` before appending.
 
 ### `locale: {}`
 
-Same as with Uppy.Core’s setting from above, this allows you to override plugin’s local string, so that instead of `Select files` in English, your users will see `Выберите файлы` in Russian. Example:
+Same as with Uppy.Core’s setting from above, this allows you to override plugin’s locale string, so that instead of `Select files` in English, your users will see `Выберите файлы` in Russian. Example:
 
 ```js
 .use(FileInput, {
@@ -97,7 +97,7 @@ See plugin documentation pages for other plugin-specific options.
 
 ## Provider Plugins
 
-The Provider plugins help you connect to your accounts with remote file providers such as [Dropbox](https://dropbox.com), [Google Drive](https://drive.google.com), [Instagram](https://instagram.com) and remote urls (import a file by pasting a direct link to it). Because this requires server to server communication, they work tightly with [uppy-server](https://github.com/transloadit/uppy-server) to manage the server to server authroization for your account. Virtually most of the communication (file download/upload) is done on the server-to-server end, so this saves you the stress of data consumption on the client.
+The Provider plugins help you connect to your accounts with remote file providers such as [Dropbox](https://dropbox.com), [Google Drive](https://drive.google.com), [Instagram](https://instagram.com) and remote urls (import a file by pasting a direct link to it). Because this requires server to server communication, they work tightly with [uppy-server](https://github.com/transloadit/uppy-server) to manage the server to server authorization for your account. Virtually most of the communication (file download/upload) is done on the server-to-server end, so this saves you the stress of data consumption on the client.
 
 As of now, the supported providers are **Dropbox**, **GoogleDrive**, **Instagram**, and **Url**.
 

+ 1 - 1
website/src/docs/progressbar.md

@@ -36,4 +36,4 @@ uppy.use(ProgressBar, {
 
 ### `hideAfterFinish: true`
 
-When true, progress bar hides after the uplaod has finished. If false, it remains visible
+When true, progress bar hides after the uplaod has finished. If false, it remains visible.

+ 14 - 14
website/src/docs/server.md

@@ -7,13 +7,13 @@ order: 2
 
 Drag and Drop, Webcam, basic file manipulation (adding metadata, for example) and uploading via tus resumable uploads or XHR/Multipart are all possible using just the uppy client module.
 
-However, if you add [uppy-server](https://github.com/transloadit/uppy-server) to the mix, your users will be able to select files from remote sources, such as Instagram, Google Drive and Dropbox, bypassing the client (so a 5 GB video isn’t eating into your users' data plans), and then uploaded to the final destination. Files are removed from uppy-server after an upload is complete, or after a reasonable timeout. Access tokens also don’t stick around for long, for security.
+However, if you add [Uppy Server](https://github.com/transloadit/uppy-server) to the mix, your users will be able to select files from remote sources, such as Instagram, Google Drive and Dropbox, bypassing the client (so a 5 GB video isn’t eating into your users’ data plans), and then uploaded to the final destination. Files are removed from Uppy Server after an upload is complete, or after a reasonable timeout. Access tokens also don’t stick around for long, for security.
 
 Uppy Server handles the server-to-server communication between your server and file storage providers such as Google Drive, Dropbox, Instagram, etc.
 
 ## Supported Providers
 
-As of now uppy-server is integrated to work with:
+As of now Uppy Server is integrated to work with:
 
 - Google Drive
 - Dropbox
@@ -29,11 +29,11 @@ npm install uppy-server
 
 ## Usage
 
-Uppy-server may either be used as a pluggable express app, which you plug to your already existing server, or it may simply be run as a standalone server:
+Uppy Server may either be used as a pluggable express app, which you plug to your already existing server, or it may simply be run as a standalone server:
 
 ### Plug to already existing server
 
-To plug uppy-server to an existing server, simply call on its `.app` method, passing in an [options](#Options) object as parameter.
+To plug Uppy Server to an existing server, simply call on its `.app` method, passing in an [options](#Options) object as parameter.
 
 ```javascript
 
@@ -66,7 +66,7 @@ app.use(uppy.app(options))
 ```
 See [Options](#Options) for valid configuration options.
 
-To enable uppy socket for realtime upload progress, you can call the `socket` method like so.
+To enable Uppy Socket for realtime upload progress, you can call the `socket` method like so:
 
 ```javascript
 ...
@@ -75,7 +75,7 @@ var server = app.listen(PORT)
 uppy.socket(server, options)
 
 ```
-This takes your `server` instance and your uppy [options](#Options) as parameters.
+This takes your `server` instance and your Uppy [options](#Options) as parameters.
 
 ### Run uppy-server on kuberenetes
 
@@ -306,11 +306,11 @@ UPPYSERVER_UPLOAD_URLS="http://master.tus.io/files/,https://master.tus.io/files/
 
 6. **customProviders(optional)** - This option enables you to add custom providers along with the already supported providers. See [Adding Custom Providers](#Adding-Custom-Providers) for more information.
 
-7. **uploadUrls(optional)** - An array of urls (full path), which uppy-server should only upload to (i.e uploads will not be permitted to other urls, except for those specified in this array).
+7. **uploadUrls(optional)** - An array of urls (full paths). If specified, Uppy Server will only accept uploads to these urls (useful when you want to make sure an Uppy Server instance is only allowed to upload to your servers, for example).
 
-8. **secret(required)** - A secret string which uppy uses to generate authorization tokens.
+8. **secret(required)** - A secret string which Uppy Server uses to generate authorization tokens.
 
-9. **debug(optional)** - A boolean flag to tell uppy whether or not to log useful debug information while running.
+9. **debug(optional)** - A boolean flag to tell Uppy Server whether or not to log useful debug information while running.
 
 ### S3 Options
 
@@ -334,7 +334,7 @@ The default value simply returns `filename`, so all files will be uploaded to th
 
 ### Adding Custom Providers
 
-As of now, uppy-server supports **Google Drive**, **Dropbox** and **Instagram** out of the box, but you may also choose to add your custom providers. You can do this by passing the `customProviders` option when calling the uppy `app` method. The custom provider is expected to support Oauth 1 or 2 for authentication/authorization.
+As of now, Uppy Server supports **Google Drive**, **Dropbox**, **Instagram**, and **Url** (remote urls) out of the box, but you may also choose to add your custom providers. You can do this by passing the `customProviders` option when calling the uppy `app` method. The custom provider is expected to support Oauth 1 or 2 for authentication/authorization.
 
 ```javascript
 let options = {
@@ -358,7 +358,7 @@ uppy.app(options)
 
 The `customProviders` option should be an object containing each custom provider. Each custom provider would in turn be an object with two keys, `config` and `module`. The `config` option would contain Oauth API settings, while the `module` would point to the provider module.
 
-To work well with uppy server, the **Module** must be a class with the following methods.
+To work well with Uppy Server, the **Module** must be a class with the following methods.
 
 1. `list (options, done)` - lists json data of user files (e.g list of all the files in a particular directory).
   - `options` - is an object containing the following attributes
@@ -371,11 +371,11 @@ To work well with uppy server, the **Module** must be a class with the following
     - token - authorization token(retrieved from oauth process) to send along with your request.
     - id - id of the file being downloaded.
   - `onData (chunk)` - a callback that should be called with each data chunk received on download. This is useful if the size of the downloaded file can be pre-determined. This would allow for pipelined upload of the file (to the desired destination), while the download is still going on.
-  - `onResponse (response)` - if the size of the downloaded file can not be pre-determined by uppy-server, then this callback should be called in place of the `onData` callback. This callback would be called after the download is done, and would take the downloaded data (response) as the argument.
+  - `onResponse (response)` - if the size of the downloaded file can not be pre-determined by Uppy Server, then this callback should be called in place of the `onData` callback. This callback would be called after the download is done, and would take the downloaded data (response) as the argument.
 
 ## Development
 
-1\. To setup uppy-server for local development, please clone the repo and install like so:
+1\. To setup Uppy Server for local development, please clone the repo and install like so:
 
 ```bash
 git clone https://github.com/transloadit/uppy-server && cd uppy-server && npm install
@@ -394,7 +394,7 @@ $EDITOR env.sh
 npm run start:dev
 ```
 
-This would get the uppy-server running on `http://localhost:3020`.
+This would get the Uppy Server running on `http://localhost:3020`.
 
 ## Running example
 

+ 26 - 25
website/src/docs/transloadit.md

@@ -12,11 +12,11 @@ The Transloadit plugin can be used to upload files to [Transloadit](https://tran
 ```js
 uppy.use(Transloadit, {
   service: 'https://api2.transloadit.com',
+  params: null,
   waitForEncoding: false,
   waitForMetadata: false,
   importFromUploadURLs: false,
   alwaysRunAssembly: false,
-  params: null,
   signature: null,
   fields: {}
 })
@@ -30,6 +30,31 @@ As of Uppy 0.24 the Transloadit plugin includes the [Tus](/docs/tus) plugin to h
 
 The Transloadit API URL to use. Defaults to `https://api2.transloadit.com`, which will attempt to route traffic efficiently based on where your users are. You can set this to something like `https://api2-us-east-1.transloadit.com` if you want to use a particular region.
 
+### `params`
+
+The Assembly parameters to use for the upload. See the Transloadit documentation on [Assembly Instructions](https://transloadit.com/docs/#14-assembly-instructions). `params` should be a plain JavaScript object, or a JSON string if you are using the [`signature`](#signature) option.
+
+The `auth.key` Assembly parameter is required. You can also use the `steps` or `template_id` options here as described in the Transloadit documentation.
+
+```js
+uppy.use(Transloadit, {
+  params: {
+    auth: { key: 'YOUR_TRANSLOADIT_KEY' },
+    steps: {
+      encode: {
+        robot: '/video/encode',
+        use: {
+          steps: [ ':original' ],
+          fields: [ 'file_input_field2' ]
+        },
+        preset: 'iphone'
+      }
+    }
+  }
+})
+```
+
+
 ### `waitForEncoding`
 
 Whether to wait for all Assemblies to complete before completing the upload.
@@ -67,30 +92,6 @@ In order for this to work, the upload plugin must assign a publically accessible
 
 When true, always create and run an Assembly when `uppy.upload()` is called, even if no files were selected. This allows running Assemblies that do not receive files, but instead use a robot like [`/s3/import`](https://transloadit.com/docs/transcoding/#s3-import) to download the files from elsewhere, for example for a bulk transcoding job.
 
-### `params`
-
-The Assembly parameters to use for the upload. See the Transloadit documentation on [Assembly Instructions](https://transloadit.com/docs/#14-assembly-instructions). `params` should be a plain JavaScript object, or a JSON string if you are using the [`signature`](#signature) option.
-
-The `auth.key` Assembly parameter is required. You can also use the `steps` or `template_id` options here as described in the Transloadit documentation.
-
-```js
-uppy.use(Transloadit, {
-  params: {
-    auth: { key: 'YOUR_TRANSLOADIT_KEY' },
-    steps: {
-      encode: {
-        robot: '/video/encode',
-        use: {
-          steps: [ ':original' ],
-          fields: [ 'file_input_field2' ]
-        },
-        preset: 'iphone'
-      }
-    }
-  }
-})
-```
-
 ### `signature`
 
 An optional signature for the Assembly parameters. See the Transloadit documentation on [Signature Authentication](https://transloadit.com/docs/#26-signature-authentication).

+ 1 - 1
website/src/docs/tus.md

@@ -24,7 +24,7 @@ The Tus plugin supports all of [tus-js-client][]’s options. Additionally:
 
 A boolean indicating whether tus should attempt to resume the upload if the upload has been started in the past. This includes storing the file’s upload url. Use false to force an entire reupload.
 
-Note that this option is about resuming when you start an upload again with the same file, or when using [Golden Retriever](/docs/golden-retriever/), which will attempt to restore upload state to what it was before page refresh / browser crash. Even if you set `resume: false` when using Tus uploader, users will still be able to pause/resume an ongoing upload.
+Note that this option is about resuming when you start an upload again with the same file, or when using [GoldenRetriever](/docs/golden-retriever/), which will attempt to restore upload state to what it was before page refresh / browser crash. Even if you set `resume: false` when using Tus uploader, users will still be able to pause/resume an ongoing upload.
 
 In most cases you should leave this option as is, relax, and enjoy resumable uploads.
 

+ 56 - 31
website/src/docs/uppy.md

@@ -44,7 +44,7 @@ const photoUploader = Uppy({ id: 'post' })
 
 ### `autoProceed: true`
 
-Starts upload automatically after the first file is selected.
+Uppy will start uploading automatically after the first file is selected.
 
 ### `restrictions: {}`
 
@@ -67,7 +67,14 @@ meta: {
 }
 ```
 
-Can be altered with [`uppy.setMeta({ username: 'Peter' })`](/docs/uppy/#uppy-setmeta-data) method.
+This global metadata is added to each file in Uppy. It can be modified with two methods:
+
+1. [`uppy.setMeta({ username: 'Peter' })`](/docs/uppy/#uppy-setmeta-data) — set or update meta for all files.
+2. [`uppy.setFileMeta('myfileID', { resize: 1500 })`](/docs/uppy/#uppy-setFileMeta-fileID-data) — set or update meta for specific file. 
+
+Metadata from each file is then attached to uploads in [Tus](/docs/tus/) and [XHRUpload](/docs/tus/) plugins.
+
+Metadata can also be added from a `<form>` element on your page via [Form](/docs/form/)plugin or via UI if you are using Dashboard with [`metaFields`](/docs/dashboard/#metaFields) option.
 
 ### `onBeforeFileAdded: (currentFile, files) => Promise.resolve()`
 
@@ -119,7 +126,7 @@ locale: {
 
 As well as the pluralization function, which is used to determine which string will be used for the provided `smart_count` number.
 
-For example, for Icelandic language the pluralization function will be:
+For example, for Icelandic language the pluralization function would be:
 
 ``` js
 locale: {
@@ -193,6 +200,28 @@ file.size      // 3947642 (returns 'N/A' if size cannot be determined)
 file.preview   // value that can be used to populate "src" attribute of an "img" tag
 ```
 
+### `uppy.upload()`
+
+Start uploading selected files.
+
+Returns a Promise `result` that resolves with an object containing two arrays of uploaded files:
+
+- `result.successful` - Files that were uploaded successfully.
+- `result.failed` - Files that did not upload successfully. These file objects will have a `.error` property describing what went wrong.
+
+```js
+uppy.upload().then((result) => {
+  console.info('Successful uploads:', result.successful)
+
+  if (result.failed.length > 0) {
+    console.error('Errors:')
+    result.failed.forEach((file) => {
+      console.error(file.error)
+    })
+  }
+})
+```
+
 ### `uppy.setState(patch)`
 
 Update `uppy.state`. Usually this method is called internally, but in some cases it might be useful to alter something in `uppy.state` directly.
@@ -203,6 +232,7 @@ Uppy’s default state on initialization:
 {
   plugins: {},
   files: {},
+  currentUploads: {},
   capabilities: {
     resumableUploads: false
   },
@@ -264,9 +294,7 @@ uppy.setMeta({ resize: 1500, token: 'ab5kjfg' })
 Updated metadata for a specific file.
 
 ```js
-uppy.setFileMeta('myfileID', {
-  resize: 1500
-})
+uppy.setFileMeta('myfileID', { resize: 1500 })
 ```
 
 ### `uppy.reset()`
@@ -277,45 +305,42 @@ Stop all uploads in progress and clear file selection, set progress to 0. Basica
 
 Uninstall all plugins and close down this Uppy instance. Also runs `uppy.reset()` before uninstalling.
 
-### `uppy.log(msgString)`
+### `uppy.log()`
 
-Logs stuff to console, only if `uppy.opts.debug` is set to true. Silent in production.
+#### Parameters
 
-### `uppy.info()`
+- **message** *{string}*
+- **type** *{string=}* `error` or `warning`
+
+Logs stuff to console, only if `uppy.opts.debug` is set to true. Silent in production.
 
 ```js
-this.info('Oh my, something good happened!', 'success', 5000)
+uppy.log('[Dashboard] adding files...')
 ```
 
-#### Parameters
-
-- **message** *string*
-- **type** *string* `info`, `warning`, `success` or `error`
-- **duration** *number* in milliseconds
-
-### `uppy.upload()`
+### `uppy.info()`
 
-Start uploading selected files.
+#### Parameters
 
-Returns a Promise `result` that resolves with an object containing two arrays of uploaded files.
+- **message** *{(string|object)}* — `'info message'` or `{ message: 'Oh no!', details: 'File couldn’t be uploaded' }`
+- **type** *{string} [type='info']* — `info`, `warning`, `success` or `error`
+- **duration** *{number} [duration = 3000]* — in milliseconds
 
- - `result.successful` - Files that were uploaded successfully.
- - `result.failed` - Files that did not upload successfully.
-   These file objects will have a `.error` property describing what went wrong.
+Sets a message in state, with optional details, that can be shown by notification UI plugins. Currently that means just the [Informer](/docs/informer/) plugin, included by default in Dashboard.
 
 ```js
-uppy.upload().then((result) => {
-  console.info('Successful uploads:', result.successful)
+this.info('Oh my, something good happened!', 'success', 3000)
+```
 
-  if (result.failed.length > 0) {
-    console.error('Errors:')
-    result.failed.forEach((file) => {
-      console.error(file.error)
-    })
-  }
-})
+```js
+this.info({
+    message: 'Oh no, something bad happened!',
+    details: 'File couldn’t be uploaded because there’s no internet connection',
+  }, 'error', 5000)
 ```
 
+`info-visible` and `info-hidden` events are emitted when this info message should be visible or hidden.
+
 ### `uppy.on('event', action)`
 
 Subscribe to an uppy-event. See below for the full list of events.

+ 2 - 3
website/src/docs/webcam.md

@@ -33,12 +33,11 @@ uppy.use(Webcam, {
 
 ### `target: null`
 
-DOM element, CSS selector, or plugin to mount the informer into.
+DOM element, CSS selector, or plugin to mount Webcam into.
 
 ### `countdown: false`
 
-When taking a picture: the amount of seconds to wait before actually taking a snapshot. If `false` or 0, the timeout is disabled entirely.
-This also shows a 'Smile!' message in the [Informer](/docs/informer) before the picture is taken.
+When taking a picture: the amount of seconds to wait before actually taking a snapshot. If `false` or 0, the timeout is disabled entirely. This also shows a `Smile!` message with the [Informer](/docs/informer) before the picture is taken.
 
 ### `onBeforeSnapshot: () => Promise.resolve()`