Display the uploaded file in server to react app

Hi everyone,

I’m currently working on a React application, and I need some guidance on how to load the Word editor using OnlyOffice DocsAPI. I’ve attempted to implement the editor using the following code:
<DocumentEditor
id=“docxEditor”
documentServerUrl=“http://172.21.16.1:8080/
config={{
document: {
fileType: “docx”,
key: “Khirz6zTPdfd7”,
title: “Example Document Title.docx”,
url: “http://172.21.16.1:8080/example/editor?fileName=test.docx&userid=uid-1&lang=en&directUrl=false”,
},
documentType: “word”,
editorConfig: {
callbackUrl: “https://example.com/url-to-callback.ashx”,
},
}}
events_onDocumentReady={onDocumentReady}
onLoadComponentError={onLoadComponentError}
/>
even i’ve uploaded to the server but when i tried to load the document, this is what i receive

Hello,
Please make sure that the provided url value points to the storage within your application with the document file (instead of document within Example, Example itself cannot be used as file storage).
Also, make sure that the link to callback leads to the callback within your own application.
After checking the above, (if the issue persists) please provide Document Server logs: /var/log/onlyoffice/documentserver (for Docker inside the container)

Currently, I’m using the example for uploading document. So i wonder how can i upload to my local server ( using local ip address and not an example edition) and how can i get the key of document file ? The follow

You should build your own document management system, store the files there, then provide an accessible link to the file in your own storage as url in url parameter.
You should generate document key on your side, each document should have unique document key.
This is how opening of the file should be implemented on the side of your storage: Opening File - ONLYOFFICE Api Documentation
By checking out this guide you can learn more about saving mechanism implementation: Saving File - ONLYOFFICE Api Documentation

i’ve setup an OnlyOffice server with docker and used react to display content of document. Could you please give me some guidance to upload file to my local server.

Have you built the storage within your application according to the above-provided links description (file opening, file saving, etc.)?
Please provide Document Server logs (/var/log/onlyoffice/documentserver inside the container) for better issue understanding