Skip to content

Multipart upload into one artifacts folder

PUT
/wp-json/wp2/media-converter/v1/attachments/{id}/artifacts/{folder}
curl --request PUT \
--url https://example.com/wp-json/wp2/media-converter/v1/attachments/1/artifacts/sources \
--header 'Content-Type: multipart/form-data' \
--header 'X-WP-Nonce: <X-WP-Nonce>' \
--form files=@file \
--form file=@file \
--form srclang=example \
--form label=example \
--form default=example

Uploads multipart files into one artifacts folder: sources, subtitles, chapters, thumbnails, or stills.

id
required
integer

Numeric entity id.

folder
required
string
Allowed values: sources subtitles chapters thumbnails stills

Artifacts folder: sources, subtitles, chapters, thumbnails, stills.

Media typemultipart/form-data
object
files

Map of relative paths to file contents (strings).

Array<string>
file

Uploaded file (multipart).

string format: binary
srclang

Field “srclang” as returned or accepted by PHP.

string
label

Product label.

string
default

Field “default” as returned or accepted by PHP.

string

Listing after folder upload, plus accepted/rejected.

Media typeapplication/json
object
attachment_id

Video attachment ID.

integer
basename

Movie basename without extension.

string
sources

Files in the sources folder (HLS/MP4, etc.).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
subtitles

Subtitle files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
chapters

Chapter files on disk.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
thumbnails

Seekbar sprite/VTT files.

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
stills

Still frames (*_thumbN.jpg).

Array<object>
object
name

File name relative to the artifacts folder.

string
url

Public file URL.

string
bytes

File size in bytes.

integer
formats

Map of format key → exists/url.

object
key
additional properties
object
exists

True if this format file already exists on disk.

boolean
url

Format file URL, or an empty string.

string
poster

Poster URL from attachment meta (may be empty).

string
accepted

Files PHP stored.

Array<object>
object
path

Relative path in the request or ZIP.

string
reason

Rejection code (rejected items) or reason.

string
message

File-save error message.

string
name

Accepted file name.

string
url

Accepted file URL.

string
rejected

Files PHP rejected (name, size, HLS limit).

Array<object>
object
path

Relative path in the request or ZIP.

string
reason

Rejection code (rejected items) or reason.

string
message

File-save error message.

string
name

Accepted file name.

string
url

Accepted file URL.

string
mode

ZIP pack mode (pack only).

string
Allowed values: replace merge
touched

Folders the pack actually changed.

Array<string>
Example
{
"mode": "replace"
}

Validation failed (including hls_segment_too_large)

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Not authenticated. WordPress REST: rest_not_logged_in / rest_forbidden. Use cookie + X-WP-Nonce or Application Password.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Insufficient capability or invalid REST nonce. WordPress REST: rest_forbidden / rest_cookie_invalid_nonce.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}