fix(dwg): correct ODA download URL + dynamic binary path lookup

- Use www.opendesign.com/guestfiles/get URL (no auth required)
- Auto-find and symlink ODA binary after dpkg install
- app.py searches multiple common install paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-09 11:24:56 +02:00
parent d84106e1b4
commit ca5856829b
2 changed files with 16 additions and 7 deletions
+8 -2
View File
@@ -13,8 +13,14 @@ app = Flask(__name__)
MAX_FILE_SIZE = 100 * 1024 * 1024 # 100 MB
# ODA File Converter installs here on Ubuntu
ODA_BIN = "/usr/bin/ODAFileConverter"
# ODA File Converter — try common install paths
ODA_BIN = "/usr/local/bin/ODAFileConverter"
for _p in ["/usr/local/bin/ODAFileConverter", "/usr/bin/ODAFileConverter",
"/opt/ODAFileConverter/ODAFileConverter",
"/opt/oda-file-converter/ODAFileConverter"]:
if os.path.isfile(_p):
ODA_BIN = _p
break
@app.route("/health", methods=["GET"])