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 | A content type for stream when uploading files without multipart request |
application/octet-stream
Set Content-Type header
|
ContentDisposition
sent in body
|
Content-Disposition header | A Content Disposition with file name for stream when uploading files without multipart request |
attachment; filename="file1.png"
Set Content-Disposition header
|
Files
sent in body
|
List of files when specified as multipart/form-data |
Collection of Microsoft.AspNetCore.Http.IFormFiles
collection
|
|
CreateNewIfExist
sent in body
|
Specifies whether to create a new file if it already exists or not | Bool value | true |
StoreOriginalFileFlag
sent in body
|
Specifies whether to upload documents in the original formats as well or not | Bool value | true |
KeepConvertStatus
sent in body
|
Specifies whether to keep the file converting status or not | Bool value | true |
Stream
sent in body
|
Request input stream | A stream for uploading files without multipart request | N/A |
You can upload files in two different ways:
POST api/2.0/files/@my/upload Host: yourportal.onlyoffice.com Content-Type: application/json Accept: application/json { "CreateNewIfExist": true, "StoreOriginalFileFlag": true, "KeepConvertStatus": true, "Stream": "N/A" }
Uploaded file(s)