document-server-integration
document-server-integration copied to clipboard
Call the upload button on the URL: http://ip_server/example/
I have deployed OnlyOffice on a remote server. I added a file upload button to the local frontend page. I want to use the test case URL: http://ip_server/example/, I hope that the file upload button of the front-end page can call the file upload function of the entire page to help me upload the file. However, I tried uploading a file to URL using JavaScript's fetch method: http://ip_server/example/upload, but couldn't successfully upload the file. How to solve this problem?
I am noob. Thanks for your help!
this question is about our integration example, so I transferred it
Hello @Try2b1st
We're using the following library for uploading files to the frontend page: https://github.com/blueimp/jQuery-File-Upload. Here's how it's used in our integration examples: https://github.com/ONLYOFFICE/document-server-integration/blob/master/web/documentserver-example/nodejs/public/javascripts/jscript.js#L63.
The most important step here is to correctly specify the integration example's address used in your particular case.