Do you want to: Suggest a feature / Report a bug / Ask a how-to question
Ask a how-to question
Document Server version: Latest
Type of installation of the Document Server (docker, deb/rpm, exe, please point us to the installation guide that you used as well):
Docker
OS:
Arch Linux
Browser version:
Firefox 134
Issue:
Relevant logs:
[2025-01-21T18:52:55.063] [ERROR] [localhost] [Khirz6zTPdfd7] [uid-1737485374514] nodeJS - error downloadFile:url=http://localhost:1234/static/sample2.docx;attempt=1;code:ECONNREFUSED;connect:null Error: connect ECONNREFUSED 127.0.0.1:1234
My config =
{
"document": {
"fileType": "docx",
"key": "Khirz6zTPdfd7",
"title": "Example Document Title.docx",
"url": "http://localhost:1234/static/sample2.docx"
},
"documentType": "word",
"token": "token",
}
I currently have a go webserver setup on localhost:1234 that has a endpoint of /static/sample2.docx which downloads sample2.docx in my downloads directory.
Golang code:
s := http.StripPrefix("/static/", http.FileServer(http.Dir("./static/")))
r.PathPrefix("/static/").Handler(s)
This refers to a folder called static and makes it into a static file server. Any file within it can be served with a localhost:1234/static/* (can be index.html, or in my case sample2.docx). It is successful when it comes to serving my .docx file once I click on it, so I would assume that it would be successful when it comes to responding to the API. I’m either thinking there is an issue with my header (though I’m not yet sure what that would look like)
Thank you