文章 Create Media REST 端点

URLs

POST api/v1/media/{mediagalleryid}/files.xml (or .json)

CREATE a media file.

请求参数

名称

类型

描述

必需

默认值

选项

MediaGalleryId

int?

Media Gallery Id

Name

string

Name

Description

string

Description

ContentType

string

Required when sending FileData

FileName

string

Required when sending FileData

FileData

Byte[]

FileData, FileUrl or FileUploadContext is required.

FileUploadContext

string

FileData, FileUrl or FileUploadContext is required.

FileUrl

string

FileData, FileUrl or FileUploadContext is required.

IsFeatured

bool?

Default is false.

FeaturedImage

string

Used to include a featured image when IsFeatured is true.

Tags

string

A comma separated list of tags.

Preview

bool?

Specifies if the request is preview only.

ExtendedAttributes

RestExtendedAttributes

Extended Attributes

OpenGraphTitle

string

Title used in Open Graph title tag.

OpenGraphDescription

string

Description used in Open Graph description tag.

OpenGraphImageContext

string

Context id for file used in Open Graph image.

OpenGraphImageFileName

string

Name for file used in Open Graph image.

MetaTitle

string

Used in the page's title.

MetaKeywords

string

Keywords for the page's meta keywords tag.

MetaDescription

string

Description for the page's meta description tag.

PostDate

DateTime?

Defaults to current datetime if not specified.