I would like to ask about the connection between onlyoffice and AwsS3 storage

1、onlyoffice connects to oss, can I customize the path and file name for saving files?Now it is found that files stored in oss are placed in the same directory, if different files want to have different levels or directories, there is or there is no way to achieve.
2、How do I convert a stored Editor.bin file to a docx file that I want to open directly

Hello @zcs

First of all, please provide following information:

  1. version of DocSpace;
  2. a link to the guide that was used to connect S3 storage to your DocSpace portal;
  3. if you didn’t follow any guidelines, please describe how S3 storage was connected for better understanding.

Hi Constantine, thanks for your reply!
I have used the production-linux.json file configuration in onlyoffice, and the specific changes are as follows:

"storage": {
"name": "storage-s3",
"region": "region",
"endpoint": "endpoint",
"bucketName": "bucketName",
"storageFolderName": "onlyoffice",
"urlExpires": 604800,
"accessKeyId": "accessKeyId",
"secretAccessKey": "secretAccessKey",
"useRequestToGetUrl": true,
"useSignedUrl": true,
"sslEnabled": false,
"s3ForcePathStyle": true
}

As you can see from the above configuration, I specified the oss address where the file is stored, and the root path is onlyoffice.
After the configuration is complete, the files I created or uploaded in onlyoffice will be stored in this path in the format of Editor.bin.

So the effect I expected was:

  1. When I upload, can I specify the level of storage of my files? For example, file A is stored in folder A under onlyoffice, file B is stored in folder B under onlyoffice, instead of the two files in the same folder onlyoffice
  2. I want to download the Editor.bin file stored on oss as an openable docx file. I looked at the official documentation of onlyoffice, but unfortunately did not find the corresponding interface that would allow me to convert Editor.bin to the expected file

Thank you for the details. May I know if you’ve followed this guide to configure your S3?

Do I understand correctly that you are using ONLYOFFICE Docs? Or it is DocSpace and you have configured Document Server that comes with it?

Thank you for your attention.
You are right. I configured the onlyoffice document_server according to the above document

This guide demonstrates how to connect S3 storage as a cache folder.

When opening a file, Document Server downloads it and temporarily stores it in cache folder to work with it in specified .bin format. Once editing is finished, Document Server converts the document back to normal format, e.g. DOCX, XLSX or PPTX, and returns a link to the storage to save the document (see how saving works here).

Cache folder has no relation to the storage as Document Server by itself does not store user documents.

What is your final goal? Do you want to store all portal data in your OSS S3 storage?

I’m not trying to store all my portal data in OSS S3 storage.
The effect I want is that I can get the files I uploaded or edited from oss.
If oss only has.bin files, is there an api/ method that allows me to convert.bin files to my original format, such as docx, etc.
Thanks!

If you’ve connected S3 as cache successfully, then all files after being edited will save back to your DocSpace. Document Server handles .bin files automatically when editing is finished, I’m afraid there is no method to convert it directly.