Explorar o código

Document results and transloadit result keys more explicitly

Renée Kooi %!s(int64=6) %!d(string=hai) anos
pai
achega
53ee4fbbe9
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      website/src/docs/transloadit-preset-picker.md

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

@@ -22,6 +22,7 @@ const resultPromise = transloadit.pick({
  - `successful` - An array containing data about files that were uploaded successfully
  - `successful` - An array containing data about files that were uploaded successfully
  - `failed` - An array containing data about files that failed to upload
  - `failed` - An array containing data about files that failed to upload
  - `transloadit` - An array of Assembly statuses
  - `transloadit` - An array of Assembly statuses
+ - `results` - An array of results produced by the assembly, if `waitForEncoding` was used
 
 
 ## `options.target`
 ## `options.target`
 
 
@@ -33,6 +34,12 @@ DOM element or CSS selector to place the modal element in. `document.body` is us
 
 
 All the options to the [Transloadit][transloadit] plugin are supported.
 All the options to the [Transloadit][transloadit] plugin are supported.
 
 
+The Promise resolution value has a `transloadit` and `results` key.
+
+`result.transloadit` contains an array of Assembly statuses. Assembly statuses are objects as described in the [Transloadit documentation][assembly-status]. There may be multiple Assembly statuses if the `getAssemblyOptions` option was used, because different files may be processed by different Assemblies.
+
+`result.results` contains an array of results produced by the Assemblies. Each result has an `assemblyId` property containing the string ID of the Assembly that produced it, and a `stepName` property containing the string name of the Assembly step that produced it.
+
 ## 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.
@@ -109,3 +116,4 @@ Specific options for the [Webcam](/docs/webcam) provider.
 
 
 [companion]: /docs/companion
 [companion]: /docs/companion
 [transloadit]: /docs/transloadit#options
 [transloadit]: /docs/transloadit#options
+[assembly-status]: https://transloadit.com/docs/api/#assembly-status-response