Inserts a file specified in the request to the "My documents" section by single file uploading.
Name | Description | Type | Example |
File
sent in body
|
File | Microsoft.AspNetCore.Http.IFormFile | |
Title
sent in body
|
File name | string | some text |
CreateNewIfExist
sent in body
|
Specifies whether to create a new file if it already exists 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 |
POST api/2.0/files/@my/insert Host: yourportal.onlyoffice.com Content-Type: application/json Accept: application/json { "Title": "some text", "CreateNewIfExist": true, "KeepConvertStatus": true, "Stream": "N/A" }
Inserted file
{ "status": 0, "response": { "FolderId": 1234, "Version": 1234, "VersionGroup": 1234, "ContentLength": "some text", "PureContentLength": 1234, "Mute": true, "ViewUrl": "some text", "WebUrl": "some text", "FileExst": "some text", "Comment": "some text", "Encrypted": true, "ThumbnailUrl": "some text", "Locked": true, "LockedBy": "some text", "DenyDownload": true, "HasDraft": true, "DenySharing": true } }