• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Examples on how to integrate ONLYOFFICE Document Server into your own website or application

Integration examples

Test examples are simple document management systems that can be built into your application for testing. Do NOT use these integration examples on your own server without proper code modifications! In case you enabled any of the test examples, disable it before going for production.

These examples show the way to integrate ONLYOFFICE Docs into your own website or application using one of the programming languages. The package contains examples written in .Net (C# MVC), .Net (C#), Java, Node.js, PHP and Ruby.

You should change http://documentserver to your server address in these files:

  • .Net (C# MVC) - web/documentserver-example/csharp-mvc/web.appsettings.config
  • .Net (C#) - web/documentserver-example/csharp/settings.config
  • Java - web/documentserver-example/java/src/main/resources/settings.properties
  • Node.js - web/documentserver-example/nodejs/config/default.json
  • PHP - web/documentserver-example/php/config.php
  • Ruby - web/documentserver-example/ruby/config/application.rb

More information on how to use these examples can be found here: http://api.onlyoffice.com/editors/demopreview

API methods for test examples

The methods described below are available for all of the test examples.

POST /upload

Summary Upload file to test example via request
URL /upload
Method POST
Request
Headers
Content-Type: multipart/form-data
Request
Body
uploadedFile=@<filepath>
filepath - file for uploading
Multipart body with the file binary contents
Response Code: 200 OK
Content on success:
{ "filename": <filename>}
Content on error:
{ "error": "Uploaded file not found" }
Or
{ "error": "File size is incorrect" }
Sample curl -X POST -F [email protected] http://localhost/upload

DELETE /file

Summary Delete one file or all files
URL /file
Method DELETE
URL Params Optional:
filename=[string] - file for deleting.
WARNING! Without this parameter, all files will be deleted
Response Code: 200 OK
Success:
{ "success": true }
Sample Delete one file:
curl -X DELETE http://localhost/file?filename=filename.docx
Delete all files:
curl -X DELETE http://localhost/file

GET /files

Summary Get information about all files
URL /files
Method GET
Response Code: 200 OK
Success:
[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}, ..., {...}]
Sample curl -X GET http://localhost/files/

GET /files/file/{fileId}

Summary Get information about a file by file id
URL /files/file/{fileId}
Method GET
Response Code: 200 OK
Content on success:
[{ "version": <file_version>, "id": <file_id>, "contentLength": <file_size_in_kilobytes>, "pureContentLength": <file_size_in_bytes>, "title": <file_name>, "updated": <last_change_date>}]
Content on error:
"File not found"
Sample curl -X GET http://localhost/files/{fileId}

Important security info

Please keep in mind the following security aspects when you are using test examples:

  • There is no protection of the storage from unauthorized access since there is no need for authorization.
  • There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
  • There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
  • There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.

Project Information

Official website: https://www.onlyoffice.com

Code repository: https://github.com/ONLYOFFICE/document-server-integration

ONLYOFFICE for developers: https://www.onlyoffice.com/developer-edition.aspx

User Feedback and Support

If you have any problems with or questions about ONLYOFFICE Document Server, please visit our official forum to find answers to your questions: forum.onlyoffice.com or you can ask and answer ONLYOFFICE development questions on Stack Overflow.

License

document-server-integration is released under the Apache-2.0 License. See the LICENSE file for more information.

More Repositories

1

DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Shell
3,957
star
2

CommunityServer

Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
C#
2,456
star
3

DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
2,229
star
4

Docker-DocumentServer

ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Shell
1,053
star
5

onlyoffice-nextcloud

The app which enables the users to edit office documents from Nextcloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Nextcloud
PHP
553
star
6

Docker-CommunityServer

Collaborative system for managing documents, projects, customer relations and emails in one place
Shell
442
star
7

docker-onlyoffice-nextcloud

Shell
356
star
8

onlyoffice-owncloud

The app which enables the users to edit office documents from ownCloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to ownCloud
JavaScript
301
star
9

core

Server core components which are a part of ONLYOFFICE Document Server
C++
251
star
10

sdkjs

JavaScript SDK which is a part of ONLYOFFICE Document Server and ONLYOFFICE Desktop Editors
JavaScript
214
star
11

web-apps

The frontend for ONLYOFFICE Document Server which builds the program interface
HTML
186
star
12

DocSpace

ONLYOFFICE DocSpace is a room-based collaborative platform which allows organizing a clear file structure depending on users' needs or project goals. Flexible access permissions and user roles allow fine-tuning the access to the whole space or separate rooms.
171
star
13

server

The backend server software layer which is the part of ONLYOFFICE Document Server and is the base for all other components
JavaScript
171
star
14

desktop-apps

The frontend for ONLYOFFICE Desktop Editors which builds the program interface
HTML
157
star
15

onlyoffice.github.io

ONLYOFFICE plugins. Code, resources, and styling for the Plugin Marketplace and Plugins Manager.
JavaScript
129
star
16

documents-app-android

Kotlin
123
star
17

sdkjs-plugins

The add-ons for ONLYOFFICE Document Server and ONLYOFFICE Desktop Editors.
JavaScript
120
star
18

build_tools

Used to build ONLYOFFICE DocumentServer-related products
Python
101
star
19

DocumentBuilder

ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
Makefile
96
star
20

docker-onlyoffice-owncloud

Shell
89
star
21

Docker-MailServer

ONLYOFFICE Mail Server is a full-featured mail server solution developed on the base of the iRedMail package, containing the following components: Postfix, Dovecot, SpamAssassin, ClamAV, OpenDKIM, Fail2ban.
Shell
77
star
22

web-apps-old

The frontend for ONLYOFFICE Document Server which builds the program interface
HTML
75
star
23

document-editor-vue

Vue component for ONLYOFFICE Document Server
TypeScript
65
star
24

document-server-proxy

Common setting for Document Server proxy
Shell
53
star
25

OneClickInstall

Installer used to automate the deployment process of ONLYOFFICE Community Edition.
C#
52
star
26

desktop-sdk

The core part of ONLYOFFICE Desktop Editors
C++
44
star
27

Kubernetes-Docs

ONLYOFFICE Docs for Kubernetes
Shell
43
star
28

appimage-desktopeditors

Portable version of ONLYOFFICE Desktop Editors
Makefile
42
star
29

dictionaries

The dictionaries of various languages used for spellchecking and hyphenation in ONLYOFFICE Document Server.
40
star
30

onlyoffice-confluence

The plugin which enables the users to edit office documents from Confluence using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Confluence
Java
36
star
31

document-editor-react

React component for ONLYOFFICE Document Server
TypeScript
32
star
32

onlyoffice_odoo

The app which enables the users to edit office documents from Odoo using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Odoo
Python
25
star
33

documents-app-ios

Swift
24
star
34

onlyoffice-redmine

The app which enables the users to edit office documents from Redmine using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Redmine
Ruby
22
star
35

plugin-zotero

Zotero plugin allows users to create bibliographies in ONLYOFFICE editors.
JavaScript
22
star
36

snap-documentserver

The ONLYOFFICE Document Server snap package for the snap package system
Shell
21
star
37

onlyoffice-mattermost

The app which enables the users to edit office documents from Mattermost using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Mattermost
Go
19
star
38

ControlPanel

Tools for administrating self-hosted ONLYOFFICE.
JavaScript
18
star
39

projects-mobile

ONLYOFFICE Projects is a free project management app for Android-based devices. It allows users to create and track projects, tasks, subtasks, and milestones on the go.
Dart
18
star
40

docs-integration-sdk-java

Java SDK for integrating ONLYOFFICE Document Server into your own website or application on Java
Java
17
star
41

onlyoffice-sharepoint

The solution which enables the users to edit office documents from SharePoint using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to SharePoint
C#
16
star
42

nssm

Forked version of git://git.nssm.cc/nssm/nssm.git http://nssm.cc/
C++
15
star
43

plugin-languagetool

Quickly correct grammar and style mistakes in ONLYOFFICE
JavaScript
15
star
44

plugin-mendeley

Mendeley plugin allows users to create bibliographies in ONLYOFFICE editors.
JavaScript
13
star
45

ansible-role-documentserver

Ansible Role Document Server
11
star
46

document-server-package

Packages for Document Server
Shell
11
star
47

core-fonts

9
star
48

snap-desktopeditors

The ONLYOFFICE Desktop Editors snap package for the snap package system
Shell
9
star
49

plugin-drawio

Use the draw.io plugin to create, edit, and insert diagrams in ONLYOFFICE Docs
JavaScript
9
star
50

plugin-ocr

OCR plugin allows recognizing text from pictures and screenshots and inserting it into ONLYOFFICE documents
JavaScript
8
star
51

onlyoffice-strapi

The app which enables the users to edit office documents from Strapi using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Strapi
JavaScript
8
star
52

xcode-assets-export-figma

A Figma plugin for export Xcode assets
TypeScript
8
star
53

DocSpace-client

ONLYOFFICE DocSpace is a room-based collaborative platform which allows organizing a clear file structure depending on users' needs or project goals. Flexible access permissions and user roles allow fine-tuning the access to the whole space or separate rooms.
JavaScript
8
star
54

api.onlyoffice.com

ASP.NET
7
star
55

plugin-macros

Macros plugin allows creating JavaScript macros to run in your documents
JavaScript
7
star
56

plugin-wordscounter

Word-counting plugin for ONLYOFFICE editors
JavaScript
7
star
57

Docker-Docs

ONLYOFFICE Docs is an online office suite comprising viewers and editors for texts, spreadsheets and presentations and enabling collaborative editing in real time. The suite provides maximum compatibility with Office Open XML formats: .docx, .xlsx, .pptx.
Dockerfile
7
star
58

plugin-wordpress

WordPress plugin allows publishing articles from ONLYOFFICE document editor on your WordPress website.
JavaScript
7
star
59

DocSpace-server

ONLYOFFICE DocSpace is a room-based collaborative platform which allows organizing a clear file structure depending on users' needs or project goals. Flexible access permissions and user roles allow fine-tuning the access to the whole space or separate rooms.
C#
7
star
60

Kubernetes-DocSpace

Smarty
6
star
61

XMPPServer

An instant messaging app used within ONLYOFFICE.
C#
6
star
62

OneClickInstall-Workspace

Shell
6
star
63

onlyoffice-wordpress

The plugin which enables the users to edit office documents from WordPress using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to WordPress
PHP
5
star
64

onlyoffice-chrome-extension

ONLYOFFICE Chrome Extension
JavaScript
5
star
65

editors-ios-sp

Swift
5
star
66

onlyoffice-plone

Plugin for integrating ONLYOFFICE online editors with Plone
Python
5
star
67

document-editor-angular-workspace

Angular component for ONLYOFFICE Document Server
TypeScript
5
star
68

onlyoffice-nuxeo

Plugin for integrating ONLYOFFICE online editors with Nuxeo
Java
5
star
69

document-builder-package

Inno Setup
4
star
70

Mail

C#
4
star
71

document-templates

Template files used to create new documents and documents with sample content
4
star
72

plugin-autocomplete

An example of an input assistant/non-standard keybord for ONLYOFFICE editors
JavaScript
4
star
73

office-js-api

Office JavaScript APIs: Tools for building macros, plugins, and interacting with ONLYOFFICE document content, Automation API and web services.
4
star
74

plugin-photoeditor

Photo Editor plugin allows editing images in ONLYOFFICE editors.
JavaScript
4
star
75

document-editor-react-samples

TypeScript
4
star
76

onlyoffice-jira

The plugin which enables the users to edit office documents from Jira using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Jira
Java
4
star
77

plugin-youtube

YouTube plugin allows embedding YouTube videos into ONLYOFFICE documents, spreadsheets, and presentations
JavaScript
4
star
78

plugin-highlightcode

Highlight code plugin allows highlighting code syntax in ONLYOFFICE documents, spreadsheets, and presentations
JavaScript
4
star
79

Kubernetes-Docs-Shards

ONLYOFFICE Docs for Kubernetes
Shell
3
star
80

Docker-DocumentServerBuilder

Docker container for build sources from DocumentServer repository
Dockerfile
3
star
81

testing-documentserver-capacity

Script for testing documentserver capacity
JavaScript
3
star
82

plugin-doc2md

Convert your formatted documents to Markdown or HTML.
JavaScript
3
star
83

plugin-typograf

Plugin to correct typography within ONLYOFFICE Docs
HTML
3
star
84

editors-webview-ios

Swift
3
star
85

document-editor-vue-samples

Vue
3
star
86

onlyoffice-suitecrm

The app which enables the users to edit office documents from SuiteCRM using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to SuiteCRM
PHP
3
star
87

onlyoffice-api-dev

Python
3
star
88

DocSpace-buildtools

ONLYOFFICE DocSpace is a room-based collaborative platform which allows organizing a clear file structure depending on users' needs or project goals. Flexible access permissions and user roles allow fine-tuning the access to the whole space or separate rooms.
Rich Text Format
3
star
89

plugin-jitsi

Make audio and video calls right in ONLYOFFICE Docs
JavaScript
3
star
90

plugin-speech

Speech plugin allows converting selected text into speech
JavaScript
3
star
91

onlyoffice-trello

The Power-Up which enables the users to edit office documents from Trello using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Trello
TypeScript
3
star
92

plugin-thesaurus

Thesaurus plugin for ONLYOFFICE allows finding synonyms and inserting them into your doc
JavaScript
3
star
93

onlyoffice-google-drive

The app which enables the users to edit office documents from Google Drive using ONLYOFFICE Docs Cloud, allows multiple users to collaborate in real time and to save back those changes to Google Drive
3
star
94

plugin-translator

Translator plugin allows translating the selected text into other languages
JavaScript
3
star
95

document-builder-integration

Examples on how to execute ONLYOFFICE Document Builder from your own website or application
C#
2
star
96

sdkjs-forms

JavaScript
2
star
97

plugin-apertium

Quickly translate text in ONLYOFFICE Docs
JavaScript
2
star
98

oforms.onlyoffice.com

JavaScript
2
star
99

plugin-html

ONLYOFFICE plugin to get your document content as HTML code, modify it, and paste back to the document.
JavaScript
2
star
100

document-server-stress-testing

2
star