Skip to content

contentTypeToFormat()

@blobs/sdk v0.1.0


@blobs/sdk / serializers / contentTypeToFormat

contentTypeToFormat(contentType?): ContentFormat

Defined in: serializers/SerializerFactory.ts:177

Maps a backend content_type string into a ContentFormat.

Unknown values fall back to 'text', matching the SerializerFactory’s default. Case-insensitive.

Parameters

contentType?

string

A blob’s content_type string.

Returns

ContentFormat