Definition

POST - 3/media/folders/{FolderId}?Description={Description}

Add a new file to the media library.

In order to use this request, you should use the Content-Type: multipart/form-data. The request body must contain at least 1 file.
The media library is currently limited to 1GB for each account, you will receive a MediaLibrarySpaceException in case there isn't enough storage available.

Request information

FolderId

The id of the media folder in which you would like to create the item. Use '0' if you would like to add the file to the root.


Type integer
Additional info
Required
Description

A description for your new file.


Type string
Additional info
Optional

Response information


Meta

The metadata such as paging parameters, status code, timestamp,... which are related to this request.


Type MetaData
Data

The actual data returned by the request.


Type Collection of MediaFile
Links

HATEOAS related to this object. It wil contain relevant url's such as previous and next page for paged results, create/update/delete action. These url's can be used in your application for the next steps in your application logic.


Type Hateoas
Sample:
{
  "Meta": {
    "Status": 1,
    "TotalRowCount": 1,
    "Limit": 1,
    "Offset": 1,
    "TotalPageCount": 1,
    "StartRec": 1,
    "StopRec": 1,
    "Timestamp": "2024-12-12T06:59:29.8460184Z",
    "IsFiltered": true
  },
  "Data": [
    {
      "MediaId": 1,
      "MediaName": "sample string 2",
      "MediaType": 3,
      "FileExtension": "sample string 4",
      "FileSize": 5,
      "Width": 6,
      "Height": 7,
      "LastModifiedDate": "2024-12-12T06:59:29.8460184Z",
      "ThumbUrl": "sample string 9",
      "Url": "sample string 10"
    },
    {
      "MediaId": 1,
      "MediaName": "sample string 2",
      "MediaType": 3,
      "FileExtension": "sample string 4",
      "FileSize": 5,
      "Width": 6,
      "Height": 7,
      "LastModifiedDate": "2024-12-12T06:59:29.8460184Z",
      "ThumbUrl": "sample string 9",
      "Url": "sample string 10"
    }
  ]
}
Sample:
<Payload xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
  <Data>
    <MediaFile z:Id="i2">
      <FileExtension>sample string 4</FileExtension>
      <FileSize>5</FileSize>
      <Height>7</Height>
      <LastModifiedDate>2024-12-12T06:59:29.8460184+00:00</LastModifiedDate>
      <MediaId>1</MediaId>
      <MediaName>sample string 2</MediaName>
      <MediaType>3</MediaType>
      <ThumbUrl>sample string 9</ThumbUrl>
      <Url>sample string 10</Url>
      <Width>6</Width>
    </MediaFile>
    <MediaFile z:Ref="i2" />
  </Data>
  <Meta>
    <IsFiltered>true</IsFiltered>
    <Limit>1</Limit>
    <Offset>1</Offset>
    <StartRec>1</StartRec>
    <Status>1</Status>
    <StopRec>1</StopRec>
    <Timestamp>2024-12-12T06:59:29.8460184+00:00</Timestamp>
    <TotalPageCount>1</TotalPageCount>
    <TotalRowCount>1</TotalRowCount>
  </Meta>
</Payload>