Git Product home page Git Product logo

luminecs / document-server-integration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onlyoffice/document-server-integration

0.0 0.0 0.0 13.08 MB

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

License: Apache License 2.0

Shell 0.01% JavaScript 24.71% Ruby 4.44% Python 3.66% PHP 6.36% Java 21.91% C# 12.36% CSS 10.13% Makefile 0.01% HTML 5.81% Smarty 1.08% Batchfile 0.02% Dockerfile 0.02% EJS 3.07% SCSS 2.23% ASP.NET 4.18%

document-server-integration's Introduction

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.

document-server-integration's People

Contributors

agolybev avatar aleksandrfedorov97 avatar ayuzhin avatar danilapog avatar dependabot[bot] avatar eloncase avatar eugenezverev avatar flaminestone avatar gurov-m avatar hellonadya avatar irinamalysheva avatar juliaradzhabova avatar k0r0l avatar kireevdmitry avatar kirillovilya avatar konovalovsergey avatar kseniafedoruk avatar linneys avatar malyginae avatar metoou avatar nsenz avatar ntyan avatar ovchinnikova-natalya avatar papacarlo avatar rivexe avatar sergeyluzyanin avatar shockwavenn avatar suxa56 avatar trofim24 avatar volshebnikq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.