MediaTransformationResult
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:9011
Result of a media transformation operation. Provides multiple ways to access the transformed media content.
Methods
Section titled “Methods”contentType()
Section titled “contentType()”contentType():
string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:9026
Returns the MIME type of the transformed media.
Returns
Section titled “Returns”string
The content type string (e.g., ‘image/jpeg’, ‘video/mp4’)
media()
Section titled “media()”media():
ReadableStream<Uint8Array<ArrayBufferLike>>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:9016
Returns the transformed media as a readable stream of bytes.
Returns
Section titled “Returns”ReadableStream<Uint8Array<ArrayBufferLike>>
A stream containing the transformed media data
response()
Section titled “response()”response():
Response
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:9021
Returns the transformed media as an HTTP response object.
Returns
Section titled “Returns”The transformed media as a Response, ready to store in cache or return to users