document-server-integration icon indicating copy to clipboard operation
document-server-integration copied to clipboard

Call the upload button on the URL: http://ip_server/example/

Open Try2b1st opened this issue 1 year ago • 2 comments

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! image image

Try2b1st avatar Jun 04 '23 12:06 Try2b1st

this question is about our integration example, so I transferred it

trofim24 avatar Aug 23 '23 21:08 trofim24

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.

SergeyKorneyev avatar Aug 25 '23 13:08 SergeyKorneyev