[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] 3D file Url encoding when feature_sefurl is set

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69ebaa33200a7_382159c4c748@gitlab-sidekiq-low-urgency-cpu-bound-v2-86ddcbb96d-6mxwn.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
7f462999 by Camile at 2026-04-24T17:29:19+00:00
[FIX] 3D file Url encoding when feature_sefurl is set
---
* [FIX] avoid corrupted fgal model downloads by using raw file route

* [FIX] 3D file Url encoding when feature_sefurl is set

See merge request tikiwiki/tiki!9916

- - - - -


2 changed files:

- lib/wiki-plugins/wikiplugin_model3dviewer.php
- src/js/tiki-model3dviewer/model3dviewer.js


Changes:

=====================================
lib/wiki-plugins/wikiplugin_model3dviewer.php
=====================================
@@ -313,7 +313,8 @@ function resolve_model3dviewer_src($params, $absolute_links = false, $filename =
     if (! empty($params['fileId'])) {
         $src = smarty_modifier_sefurl($params['fileId'], 'file');
         $src = TikiLib::tikiUrl($src);
-        $src = $src . '&display&filename=' . $filename;
+        $separator = str_contains($src, '?') ? '&' : '?';
+        $src .= $separator . 'filename=' . rawurlencode($filename);
     } elseif (! empty($params['src'])) {
         $src = trim($params['src']);
         $src = str_replace(' ', '', $src);


=====================================
src/js/tiki-model3dviewer/model3dviewer.js
=====================================
@@ -57,6 +57,7 @@ export function initViewer(containerId, options) {
     const aspect = width / height;
 
     const clock = new Clock();
+    const ext = getExtensionFromUrl(modelUrl);
 
     // === Set up scene ===
     const scene = new Scene();
@@ -173,9 +174,6 @@ export function initViewer(containerId, options) {
         }
     };
 
-    // === Determine loader by file extension ===
-    const ext = getExtensionFromUrl(modelUrl);
-
     switch (ext) {
         case "glb":
         case "gltf":



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7f46299930cccb55cb3a17258e8f8052d4362433

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/7f46299930cccb55cb3a17258e8f8052d4362433
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.