POST api/2.0/files/{folderId}/insert
Inserts a file specified in the request to the selected folder by single file uploading.
Name |
Description |
Type |
Example |
folderId
sent in body
|
Folder ID
|
`0
|
|
File
sent in body
|
File
|
Microsoft.AspNetCore.Http.IFormFile
|
|
Title
sent in body
|
File name
|
System.String
|
|
CreateNewIfExist
sent in body
|
Specifies whether to create a new file if it already exists 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
|
|
POST api/2.0/files/{folderid}/insert
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json
{
"folderId": null,
"Title": "some text",
"KeepConvertStatus": true,
"Stream": "N/A"
}
Inserted file informationy
application/json
{
"status": 0,
"response": {
"FolderId": 1234,
"Version": 1234,
"VersionGroup": 1234,
"ContentLength": "some text",
"Mute": true,
"ViewUrl": "some text",
"WebUrl": "some text",
"FileExst": "some text",
"Comment": "some text",
"ThumbnailUrl": "some text",
"LockedBy": "some text",
"DenyDownload": true,
"DenySharing": true
}
}
text/xml
<result>
<status>0</status>
<response>
<FolderId>1234</FolderId>
<Version>1234</Version>
<VersionGroup>1234</VersionGroup>
<ContentLength>some text</ContentLength>
<Mute>True</Mute>
<ViewUrl>some text</ViewUrl>
<WebUrl>some text</WebUrl>
<FileExst>some text</FileExst>
<Comment>some text</Comment>
<ThumbnailUrl>some text</ThumbnailUrl>
<LockedBy>some text</LockedBy>
<DenyDownload>True</DenyDownload>
<DenySharing>True</DenySharing>
</response>
</result>