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

"Camile \(@camilevahviraki\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a16d8271cdf8_38192fbc6fb@gitlab-sidekiq-low-urgency-cpu-bound-v2-6f8d89675c-84vmt.mail>

Camile pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
52478694 by Camile at 2026-05-27T11:34:04+00:00
[FIX] 3D file Url encoding when feature_sefurl is set
---
* [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

See merge request tikiwiki/tiki!10381

- - - - -


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/52478694387b29f201687888b40f1bce0f6e393b

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/52478694387b29f201687888b40f1bce0f6e393b
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.