[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Display server-side 'Feedback:error' messages when uploading files via...

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <694022c2b66f0_2a17f78c9399@gitlab-sidekiq-low-urgency-cpu-bound-v2-79d645d478-h5ddr.mail>

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


Commits:
34e2f78a by Merci Jacob at 2025-12-15T14:52:10+00:00
[FIX] Display server-side 'Feedback:error' messages when uploading files via the tracker files field
---
* [FIX] Display server-side 'Feedback:error' messages when uploading files via the tracker files field

See merge request tikiwiki/tiki!9234

- - - - -


1 changed file:

- lib/jquery_tiki/files.js


Changes:

=====================================
lib/jquery_tiki/files.js
=====================================
@@ -48,6 +48,8 @@
 
     FileList = function (options) {
         var $list = $(options.list);
+
+        this.list = $list;
         this.clearErrors = function () {
             $list.find('.text-danger').remove();
         };
@@ -174,6 +176,10 @@
                         error: function (jqXHR, textStatus, errorThrown) {
                             progressBar.updateSegment(k, 0, 0);
                             fileList.addError(file, errorThrown);
+                            const tikiFeedback = jqXHR.getResponseHeader('X-Tiki-Feedback');
+                            if (tikiFeedback) {
+                                fileList.list.append(decodeURIComponent(tikiFeedback));
+                            }
                         },
                         complete: function (data, textStatus) {
                             $(window).dequeue('process-upload');



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/34e2f78a8524fa549b1aeb46b90406baf4f6ec1a

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/34e2f78a8524fa549b1aeb46b90406baf4f6ec1a
You're receiving this email because of your account on gitlab.com.

_______________________________________________
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.