POST api/v1/Media

Creates a new Media

Request Information

URI Parameters

None.

Body Parameters

CreateMediaDto
NameDescriptionTypeAdditional information
Name

(Friendly) Name of the media

string

Required

String length: inclusive between 1 and 255

FolderId

The ID of the folder where the media is going to be stored.

integer

Required

ContentType

The media's content type e.g. image/jpeg

string

Required

String length: inclusive between 1 and 50

Media

The media file as byte array

Collection of byte

Required

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "FolderId": 2,
  "ContentType": "sample string 3",
  "Media": "QEA="
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ReadMediaDto
NameDescriptionTypeAdditional information
Id

The ID of the media

integer

None.

Name

The name of the media

string

String length: inclusive between 0 and 255

ContentType

The content type of the media

string

String length: inclusive between 0 and 50

SizeInBytes

The media's size in bytes

integer

None.

PublicUrl

The media's public URL

string

String length: inclusive between 0 and 500

ThumbnailUrl

The media's Thumbnail URL

string

String length: inclusive between 0 and 500

LastModified

The Datetimeoffset when the Media was last modified

date

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "ContentType": "sample string 3",
  "SizeInBytes": 4,
  "PublicUrl": "sample string 5",
  "ThumbnailUrl": "sample string 6",
  "LastModified": "2024-03-28T07:06:01.0117722+00:00"
}