Skip to content

Commit

Permalink
Merge branch 'add/61447-upload-media-pkg' into add/61447-media-upload…
Browse files Browse the repository at this point in the history
…-provider
  • Loading branch information
swissspidy committed Oct 24, 2024
2 parents f783f02 + 07680ca commit 7d3f04d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions packages/upload-media/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,40 @@ _Parameters_
- _error_ `Error`: Error instance.
- _silent_ Whether to cancel the item silently, without invoking its `onError` callback.

#### grantApproval

Approves a proposed optimized/converted version of a file so it can continue being processed and uploaded.

_Parameters_

- _id_ `number`: Item ID.

#### optimizeExistingItem

Adds a new item to the upload queue for optimizing (compressing) an existing item.

_Parameters_

- _$0_ `OptimizeExistingItemArgs`:
- _$0.id_ `OptimizeExistingItemArgs[ 'id' ]`: Attachment ID.
- _$0.url_ `OptimizeExistingItemArgs[ 'url' ]`: URL.
- _$0.fileName_ `[OptimizeExistingItemArgs[ 'fileName' ]]`: File name.
- _$0.poster_ `[OptimizeExistingItemArgs[ 'poster' ]]`: Poster URL.
- _$0.batchId_ `[OptimizeExistingItemArgs[ 'batchId' ]]`: Batch ID.
- _$0.onChange_ `[OptimizeExistingItemArgs[ 'onChange' ]]`: Function called each time a file or a temporary representation of the file is available.
- _$0.onSuccess_ `[OptimizeExistingItemArgs[ 'onSuccess' ]]`: Function called after the file is uploaded.
- _$0.onBatchSuccess_ `[OptimizeExistingItemArgs[ 'onBatchSuccess' ]]`: Function called after a batch of files is uploaded.
- _$0.onError_ `[OptimizeExistingItemArgs[ 'onError' ]]`: Function called when an error happens.
- _$0.additionalData_ `[OptimizeExistingItemArgs[ 'additionalData' ]]`: Additional data to include in the request.

#### rejectApproval

Rejects a proposed optimized/converted version of a file by essentially cancelling its further processing.

_Parameters_

- _id_ `number`: Item ID.

<!-- END TOKEN(Autogenerated actions|src/store/actions.ts) -->

### Selectors
Expand Down

0 comments on commit 7d3f04d

Please sign in to comment.