瀏覽代碼

Link to transloadit docs for now

Renée Kooi 6 年之前
父節點
當前提交
b561871ea7

+ 6 - 0
website/src/docs/transloadit-preset-form.md

@@ -32,6 +32,12 @@ When the user submits the form, we intercept it and send the files to Transloadi
 
 
 Finally, we _really_ submit the form—without files, but with those Assembly status objects. You can then handle that in your backend.
 Finally, we _really_ submit the form—without files, but with those Assembly status objects. You can then handle that in your backend.
 
 
+## Transloadit
+
+**TODO inline most of this?**
+
+All the options to the [Transloadit][transloadit] plugin are supported.
+
 ## Restrictions
 ## Restrictions
 
 
 Set rules and conditions to limit the type and/or number of files that can be selected. Restrictions are configured by the `restrictions` option.
 Set rules and conditions to limit the type and/or number of files that can be selected. Restrictions are configured by the `restrictions` option.

+ 13 - 0
website/src/docs/transloadit-preset-picker.md

@@ -17,10 +17,22 @@ const resultPromise = transloadit.pick(target, {
 })
 })
 ```
 ```
 
 
+`resultPromise` is a [Promise][promise] that resolves with an object:
+
+ - `successful` - An array containing data about files that were uploaded successfully
+ - `failed` - An array containing data about files that failed to upload
+ - `transloadit` - An array of Assembly statuses
+
 ## `target`
 ## `target`
 
 
 DOM element or CSS selector to place the modal element in. `document.body` is usually fine in this case because the modal is absolutely positioned on top of everything anyway.
 DOM element or CSS selector to place the modal element in. `document.body` is usually fine in this case because the modal is absolutely positioned on top of everything anyway.
 
 
+## Transloadit
+
+**TODO inline most of this?**
+
+All the options to the [Transloadit][transloadit] plugin are supported.
+
 ## Restrictions
 ## Restrictions
 
 
 Set rules and conditions to limit the type and/or number of files that can be selected. Restrictions are configured by the `restrictions` option.
 Set rules and conditions to limit the type and/or number of files that can be selected. Restrictions are configured by the `restrictions` option.
@@ -96,3 +108,4 @@ Specific options for the [URL](/docs/url) provider.
 Specific options for the [Webcam](/docs/webcam) provider.
 Specific options for the [Webcam](/docs/webcam) provider.
 
 
 [companion]: /docs/companion
 [companion]: /docs/companion
+[transloadit]: /docs/transloadit#options

+ 10 - 3
website/src/docs/transloadit-preset-upload.md

@@ -17,18 +17,25 @@ const resultPromise = transloadit.upload(files, {
 })
 })
 ```
 ```
 
 
+`resultPromise` is a [Promise][promise] that resolves with an object:
+
+ - `successful` - An array containing data about files that were uploaded successfully
+ - `failed` - An array containing data about files that failed to upload
+ - `transloadit` - An array of Assembly statuses
+
 ## `files`
 ## `files`
 
 
 An array of [File][file] objects, obtained from an `<input type="file">` or elsewhere.
 An array of [File][file] objects, obtained from an `<input type="file">` or elsewhere.
 
 
 These can also be [Blob][blob]s with a `.name` property. That way you can upload files that were created using JavaScript.
 These can also be [Blob][blob]s with a `.name` property. That way you can upload files that were created using JavaScript.
 
 
-## Options
+## Transloadit
 
 
-This method supports all the options of the [Transloadit Plugin][tl-options].
+**TODO inline most of this?**
 
 
-TODO inline them here probably
+All the options to the [Transloadit][tl-options] plugin are supported.
 
 
 [file]: https://developer.mozilla.org/en-US/docs/Web/API/File
 [file]: https://developer.mozilla.org/en-US/docs/Web/API/File
 [blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob
 [blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob
+[promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
 [tl-options]: /docs/transloadit#options
 [tl-options]: /docs/transloadit#options