POST api/Common/Attachments/UploadBase64
Сохраняет файлы в формате base64 во временное хранилище
Request Information
URI Parameters
None.
Body Parameters
Список файлов
Collection of Base64File| Name | Description | Type | Additional information |
|---|---|---|---|
| Name |
Наименование файла с расширением |
string |
None. |
| ContentType |
Тип содержимого |
string |
None. |
| Content |
Содержимое файла в формате base64 |
string |
None. |
Request Formats
application/json, text/json
Sample:
[
{
"Name": "sample string 1",
"ContentType": "sample string 2",
"Content": "sample string 3"
},
{
"Name": "sample string 1",
"ContentType": "sample string 2",
"Content": "sample string 3"
}
]
text/html, multipart/form-data
Sample:
[{"Name":"sample string 1","ContentType":"sample string 2","Content":"sample string 3"},{"Name":"sample string 1","ContentType":"sample string 2","Content":"sample string 3"}]
application/xml, text/xml
Sample:
<ArrayOfBase64File xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Common">
<Base64File>
<Content>sample string 3</Content>
<ContentType>sample string 2</ContentType>
<Name>sample string 1</Name>
</Base64File>
<Base64File>
<Content>sample string 3</Content>
<ContentType>sample string 2</ContentType>
<Name>sample string 1</Name>
</Base64File>
</ArrayOfBase64File>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Success Resource Description
Collection of FileInfoViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
Идентификатор файла |
integer |
None. |
| Name |
Наименование файла |
string |
None. |
| Extension |
Расширение файла |
string |
None. |
| Uri |
ссылка на файл |
URI |
None. |
| Size |
Размер файла |
integer |
None. |
| Guid |
уникальная метка вложенного файла |
globally unique identifier |
None. |
| OwnerName |
Имя владельца вложения |
string |
None. |
| OwnerSurname |
Фамилия владельца вложения |
string |
None. |
| AttachmentDate |
Дата прикрепления вложения |
date |
None. |
Error Resource Description (Реализовано не везде)
OperationResult| Name | Description | Type | Additional information |
|---|---|---|---|
| Target |
Возвращаемый объект |
Object |
None. |
| Status |
Статус операции |
ResultStatus |
None. |
| Error |
Детализация ошибки |
Error |
None. |
Response Formats
application/json, text/json
Sample:
[
{
"Id": 1,
"Name": "sample string 2",
"Extension": "sample string 3",
"Uri": "http://webapihelppage4.com",
"Size": 5,
"Guid": "fc3f8f7b-686c-4080-ab95-d50885551b70",
"OwnerName": "sample string 7",
"OwnerSurname": "sample string 8",
"AttachmentDate": "2026-02-04T09:13:11+08:00"
},
{
"Id": 1,
"Name": "sample string 2",
"Extension": "sample string 3",
"Uri": "http://webapihelppage4.com",
"Size": 5,
"Guid": "fc3f8f7b-686c-4080-ab95-d50885551b70",
"OwnerName": "sample string 7",
"OwnerSurname": "sample string 8",
"AttachmentDate": "2026-02-04T09:13:11+08:00"
}
]
text/html, multipart/form-data
Sample:
[{"Id":1,"Name":"sample string 2","Extension":"sample string 3","Uri":"http://webapihelppage4.com","Size":5,"Guid":"fc3f8f7b-686c-4080-ab95-d50885551b70","OwnerName":"sample string 7","OwnerSurname":"sample string 8","AttachmentDate":"2026-02-04T09:13:11+08:00"},{"Id":1,"Name":"sample string 2","Extension":"sample string 3","Uri":"http://webapihelppage4.com","Size":5,"Guid":"fc3f8f7b-686c-4080-ab95-d50885551b70","OwnerName":"sample string 7","OwnerSurname":"sample string 8","AttachmentDate":"2026-02-04T09:13:11+08:00"}]
application/xml, text/xml
Sample:
<ArrayOfFileInfoViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AGAT.TSSM.API.Models.Common">
<FileInfoViewModel>
<AttachmentDate>2026-02-04T09:13:11.1554134+08:00</AttachmentDate>
<Extension>sample string 3</Extension>
<Guid>fc3f8f7b-686c-4080-ab95-d50885551b70</Guid>
<Id>1</Id>
<Name>sample string 2</Name>
<OwnerName>sample string 7</OwnerName>
<OwnerSurname>sample string 8</OwnerSurname>
<Size>5</Size>
<Uri>http://webapihelppage4.com/</Uri>
</FileInfoViewModel>
<FileInfoViewModel>
<AttachmentDate>2026-02-04T09:13:11.1554134+08:00</AttachmentDate>
<Extension>sample string 3</Extension>
<Guid>fc3f8f7b-686c-4080-ab95-d50885551b70</Guid>
<Id>1</Id>
<Name>sample string 2</Name>
<OwnerName>sample string 7</OwnerName>
<OwnerSurname>sample string 8</OwnerSurname>
<Size>5</Size>
<Uri>http://webapihelppage4.com/</Uri>
</FileInfoViewModel>
</ArrayOfFileInfoViewModel>
