Sdoc can not save back to seafile

Seafile Comm 11.0.3 + SeaDoc 0.4:
1、ceate a new empty sdoc file in seafile web
2、click and open this sdoc file in seafile web
3、input something,get saved success tip in top area
4、back seafile, no updated, still a empty sdoc file

2024-01-18 15:43:00,877 [ERROR] seahub.seadoc.apis:169 post save sdoc failed 2cef5ddf-cc73-4397-a95d-77debf977166, {“error”: “No target_file given.”}
2024-01-18 15:43:00,879 [WARNING] django.request:241 log_response Bad Request: /api/v2.1/seadoc/upload-file/2cef5ddf-cc73-4397-a95d-77debf977166/

We cannot reproduce the issue with a newly installed Seafile Comm 11.0.3 + SeaDoc 0.4.

catch the request from sdoc-server to seafile, and to fileserver(upstream by nginx)

modify /opt/seafile/seafile-server-latest/seahub/seahub/seadoc/, get request info:
post: https://xxx:34443/seafhttp/update-api/2a2e067a-a0f7-4605-b143-89008533d109
body: {‘file’: <InMemoryUploadedFile: 0676d5b3-a51b-436b-9209-bdb32f4df148 (application/octet-stream)>, ‘file_name’: ‘q.sdoc’, ‘target_file’: ‘/q.sdoc’}

log by nginx(upstream to fileserver https://xxx:34443/seafhttp/xxx), it seemed ok:
Content-Disposition: form-data; name=“file”; filename=“9b4e773d-1c47-4bc2-9af0-730d477e371b”

Content-Disposition: form-data; name=“file_name”; filename=“file_name

Content-Disposition: form-data; name=“target_file”; filename=“target_file


why fileserver report “No target_file given.”
I have delete seafile and sdoc server docker images, and re-pull from docker hub, it still not work.

It seems that when submitting a request, some parameters use the requests “file mode”, causing the server unable to obtain them.

class SeadocUploadFile(APIView):

# update file
files = {
‘file’: file,
# ‘file_name’: uuid_map.filename,
# ‘target_file’: file_path,
datas = {
** ‘file_name’: uuid_map.filename,**
** ‘target_file’: file_path,**
** }**
resp =, data=datas, files=files)

also can not online convert sdoc to docx, report “Internal Error”
2024-03-25 18:26:01,821 [ERROR] seahub.api2.endpoints.file:663 post convert file error status: 500 body: {“error_msg”:“{"error": "No parent_dir given.\n"}\n”}

[2024-03-25 15:55:34,668] [ERROR] seadoc_converter.server.apis:152 sdoc_convert_to_docx {“error”: “No parent_dir given.”}

@flask_app.route(‘/api/v1/sdoc-export-to-docx/’, methods=[‘POST’])
def sdoc_export_to_docx():

files = {
‘file’: (new_filename, docx_content),
# ‘parent_dir’: parent_dir,
datas = {
** ‘parent_dir’: parent_dir,**
** }**
resp =, files=files, data=datas)

Although this has been fixed by modifying code, but is it caused by the environment???

Maybe it is caused by your special environment. We don’t have such errors in other deployments.