Renée Kooi 6 years ago
parent
commit
4f1c584dd6
1 changed files with 40 additions and 0 deletions
  1. 40 0
      website/src/docs/transloadit-preset.md

+ 40 - 0
website/src/docs/transloadit-preset.md

@@ -24,12 +24,52 @@ Then, with a bundler such as [webpack][webpack] or [Browserify][browserify], do:
 const transloadit = require('@uppy/transloadit-preset')
 ```
 
+If you are not using a bundler, you can also import the Transloadit Preset using an HTML script tag.
+
+```html
+<link rel="stylesheet" href="https://transloadit.edgly.net/TODO_INSERT_URL.css">
+<script src="https://transloadit.edgly.net/TODO_INSERT_URL.js"></script>
+```
+
 ## File Picker
 
+Show a modal UI that allows users to pick files from their device and from the web. It uploads files to Transloadit for processing.
+
+```js
+const resultPromise = transloadit.pick('body', {
+  params: {
+    auth: { key: '' },
+    template_id: ''
+  }
+})
+```
+
 ## Form
 
+Add resumable uploads and Transloadit's processing to your existing HTML form uploads.
+
+```js
+transloadit.form('form#myForm', {
+  params: {
+    auth: { key: '' },
+    template_id: ''
+  }
+})
+```
+
 ## Programmatic Uploads
 
+Upload files straight to Transloadit from your own custom UI. Give us an array of files, and we'll give you an array of results!
+
+```js
+const resultPromise = transloadit.upload(files, {
+  params: {
+    auth: { key: '' },
+    template_id: ''
+  }
+})
+```
+
 [transloadit]: https://transloadit.com/
 [browserify]: https://browserify.org
 [webpack]: https://webpack.js.org