Univention Bugzilla – Bug 38276
allow multifile uploads
Last modified: 2015-04-30 12:32:00 CEST
+++ This bug was initially created as a clone of Bug #32888 +++ We got the following feedback for Materialverteilung in the forum (http://forum.univention.de/viewtopic.php?f=44&t=1545&p=10240): "ich denke, dass die Materialverteilung bzw. -einsammlung insgesamt nicht den Ansprüchen genügt: Es gibt genügend Szenarien, bei denen Schülerleistungen nicht nur aus einer Datei bestehen. Unter Umständen entstehen ganze Verzeichnisstrukturen. Eine Kopie dieser Strukturen in Austauschordner verbietet sich bei Leistungskontrollen von selbst."
the umc web server needs to be adapted to allow the upload of several files at once
Drees, please fix the bug number in the YAML file.
YAML has been fixed
Some fine tuning problems still exist: * The upload limit is not respected correctly, AFAIS, the limit refers to all multi files together that are sent (as it is only one request). * When selecting multiFile=true and sending only one file, callback functions should still be called with an array of one element. This way it is much easier for programming and avoids additional checks (multiFile=true → always arrays). * onUploaded() never receives an array, only the first file being uploaded. * onChange() is only called with a string. I would expect an array here, as well. * MultiUploader::get('value') will return duplicated entries (if one file is uploaded multiple times). * onUploaded() is not called with the MultiUploader (I guess this did not work before, either). * watch('value', ...) does not work properly as _setValueAttr() needs to call this._set('value', newValue), as well (this did not work before, either). As discussed, I reverted your changes to the umc-frontend package for now. I also added some test cases for the uploader widget. These will be linked automatically to build/tests when calling make build-dev. I will adjust the YAML file in a different commit. r59936 | Bug #38276: revert r59853 r59935 | Bug #38276: revert r59866 r59934 | Bug #38276: revert r59876 r59933 | Bug #38276: added tests for uploader widgets and updated existing tests
changes have been re-comitted
r60074 onUploaded() now is recieving an array fixed duplicated entries in Multiuploader (get and set 'values)
Please make sure that every callback handler receives an array if multiFile is set toggled on.
Created attachment 6854 [details] Patch for correct value and set*Attr() handling Attached you find some adjustments that make the uploader widgets work properly against the latest uploader tests (i.e. with correct value handling (array/string) and notification of observers).
I opened Bug 38335 → the check for free disk space during multifile uploads is not done for all uploaded files together. IMHO, this can be adjusted at a later point.
The issues with the callback handling have been addressed. Proposed patch has been applied.
(In reply to Drees Dormann from comment #10) > The issues with the callback handling have been addressed. > > Proposed patch has been applied. Last changes: r60139 | Yaml Bug #38276 r60137 | *Bug #38276: callbacks will now always recieve an array if mutliFile (BTW, the commit message of r60137 contains two typos.) Changes: OK YAML file: OK → VERIFIED.
<http://errata.univention.de/ucs/4.0/162.html>