POST api/File/Upload

上传文件

Request Information

URI Parameters

None.

Body Parameters

FileRequest
NameDescriptionTypeAdditional information
FolderId

string

None.

FileData

Collection of byte

None.

FileName

string

None.

Token

string

None.

ControlId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "FolderId": "sample string 1",
  "FileData": "QEA=",
  "FileName": "sample string 2",
  "Token": "sample string 3",
  "ControlId": "sample string 4"
}

application/xml, text/xml

Sample:
<FileRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Request">
  <ControlId>sample string 4</ControlId>
  <FileData>QEA=</FileData>
  <FileName>sample string 2</FileName>
  <FolderId>sample string 1</FolderId>
  <Token>sample string 3</Token>
</FileRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ApiResultOfFileInfoResponse
NameDescriptionTypeAdditional information
Code

ApiCode

None.

Message

string

None.

Body

FileInfoResponse

None.

IsSuccess

boolean

None.

SubCode

SubCode

None.

SubMessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Code": 0,
  "Message": "sample string 1",
  "Body": {
    "Id": "sample string 1",
    "FolderId": "sample string 2",
    "FileName": "sample string 3",
    "CreateTime": "2024-10-19T13:25:28.7372069+08:00",
    "Size": "sample string 5",
    "Type": 1,
    "DownloadUrl": "sample string 6",
    "DownloadUrlInternal": "sample string 7",
    "PreviewUrl": "sample string 8",
    "OnlinePreviewUrl": "sample string 9"
  },
  "IsSuccess": true,
  "SubCode": 0,
  "SubMessage": "sample string 2"
}

application/xml, text/xml

Sample:
<ApiResultOfFileInfoResponserUIxL1Kj xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO">
  <Body xmlns:d2p1="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Response">
    <d2p1:CreateTime>2024-10-19T13:25:28.7372069+08:00</d2p1:CreateTime>
    <d2p1:DownloadUrl>sample string 6</d2p1:DownloadUrl>
    <d2p1:DownloadUrlInternal>sample string 7</d2p1:DownloadUrlInternal>
    <d2p1:FileName>sample string 3</d2p1:FileName>
    <d2p1:FolderId>sample string 2</d2p1:FolderId>
    <d2p1:Id>sample string 1</d2p1:Id>
    <d2p1:OnlinePreviewUrl>sample string 9</d2p1:OnlinePreviewUrl>
    <d2p1:PreviewUrl>sample string 8</d2p1:PreviewUrl>
    <d2p1:Size>sample string 5</d2p1:Size>
    <d2p1:Type>Jpeg</d2p1:Type>
  </Body>
  <Code>Success</Code>
  <Message>sample string 1</Message>
  <SubCode>Success</SubCode>
  <SubMessage>sample string 2</SubMessage>
</ApiResultOfFileInfoResponserUIxL1Kj>