JS Built-ins
Blobbeginner

Blob β€” type option

πŸ“– Usage Example
const b = new Blob(['data'], { type: 'text/plain' })
b.type  // β†’ 'text/plain'

Pass a type option to set the MIME type of the Blob.

Blob MIME Type

Pass a { type } option to set the MIME type of the Blob.

Challenge: Verify that new Blob(['hello'], { type: 'text/plain' }).type === 'text/plain'.

πŸ’‘ Hints (1)
  • β€’ The type option sets the MIME type, it does not affect size.