POST api/2.0/files/@my/upload
Uploads a file specified in the request to the "My documents" section by single file uploading or standart multipart/form-data method.
Name |
Description |
Type |
Example |
File
sent in body
|
File
|
Microsoft.AspNetCore.Http.IFormFile
|
|
ContentType
sent in body
|
Content-Type header
|
System.Net.Mime.ContentType
|
|
ContentDisposition
sent in body
|
Content-Disposition header
|
System.Net.Mime.ContentDisposition
|
|
Files
sent in body
|
List of files when specified as multipart/form-data
|
System.Collections.Generic.IEnumerable{Microsoft.AspNetCore.Http.IFormFile}
|
|
CreateNewIfExist
sent in body
|
Specifies whether to create a new file if it already exists or not
|
System.Nullable{System.Boolean}
|
|
StoreOriginalFileFlag
sent in body
|
Specifies whether to upload documents in the original formats as well or not
|
System.Nullable{System.Boolean}
|
|
KeepConvertStatus
sent in body
|
Specifies whether to keep the file converting status or not
|
System.Boolean
|
|
Stream
sent in body
|
Request input stream
|
System.IO.Stream
|
|
You can upload files in two different ways:
- Using single file upload. You should set the Content-Type and Content-Disposition headers to specify a file name and content type, and send the file to the request body.
- Using standart multipart/form-data method.
POST api/2.0/files/@my/upload
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"KeepConvertStatus": true,
"Stream": "N/A"
}