Bug 32331 - Enhance upload widget
Enhance upload widget
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Distribution
UCS@school 3.1 R2
Other Linux
: P5 enhancement (vote)
: UCS@school 4.0 R2
Assigned To: Drees Dormann
Florian Best
:
: 32888 (view as bug list)
Depends on: 38276
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-23 15:43 CEST by Michael Grandjean
Modified: 2015-05-11 19:24 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments
outside loop (1.38 KB, patch)
2015-04-28 17:03 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2013-08-23 15:43:14 CEST
We should provide the possibility to upload folders and multiple files at once. Right now, you need to select and upload every file one by one, which can be annoying.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2014-10-15 11:51:36 CEST
See also bug 32888
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2015-03-20 15:54:49 CET
HTML5 supports the upload of multiple files at once:
Code: <input type="file" name="upl" multiple />
      <!-- the "multiple" keyword is the important thing -->
Demo: http://demo.tutorialzine.com/2013/05/mini-ajax-file-upload-form/

If easy to implement, drag and drop would be also a nice feature.

Besides the UMC distribution module, please alter also the exam module and if required also the CSV import module.
Comment 4 Alexander Kläser univentionstaff 2015-03-27 09:20:34 CET
(In reply to Florian Best from comment #3)
> http://dojotoolkit.org/reference-guide/1.10/dojox/form/Uploader.html
> http://dojotoolkit.org/reference-guide/1.10/dojox/form/uploader/FileList.html
> http://clubajax.org/the-new-dojo-html5-multi-file-uploader/

IE10+ should support HTML5 multi file upload:

http://caniuse.com/#feat=forms

Can we assume that users use IE10+ or FF/Chrome?

AFAIK, the Dojo Uploader comes with test scripts (also server side) ... these should be evaluated in a first step with different browser versions (also mobile to be sure). See the last section entitled "UploadFile.php":

http://dojotoolkit.org/documentation/tutorials/1.10/uploader/
Comment 5 Alexander Kläser univentionstaff 2015-04-22 12:09:56 CEST
*** Bug 32888 has been marked as a duplicate of this bug. ***
Comment 6 Alexander Kläser univentionstaff 2015-04-22 12:17:05 CEST
(In reply to Sönke Schwardt-Krummrich from comment #2)
> [...]
> If easy to implement, drag and drop would be also a nice feature.

Possible, not that easy at them moment... this needs to be done at a later point in the future.

> Besides the UMC distribution module, please alter also the exam module and
> if required also the CSV import module.

The distribution and exam modules should support the multi file option (the CSV import module needs only to support single uploads for now). As the changes for the uploader widget will be published via Bug 38276 as erratum separately, both modules will need to be backwards compatible to also support an uploader widget without multi file support.
Comment 7 Alexander Kläser univentionstaff 2015-04-22 14:21:27 CEST
Referring to [r59852]: Please use a check similar to (!(fileInfo instanceof Array)) instead of ('name' in fileInfo), this reads IMHO better.
Comment 8 Drees Dormann univentionstaff 2015-04-22 14:31:44 CEST
revision r60074

(In reply to Alexander Kläser from comment #7)
> Referring to [r59852]: Please use a check similar to (!(fileInfo instanceof
> Array)) instead of ('name' in fileInfo), this reads IMHO better.

had to use this check since fileInfo always is an array.


The distribution and exam module have been adapted to support uploading multiple files at once.

Still, uploading folder is still not possible.

Uploading of multiple files is only possible with ucs 4.0-1 and a patched univention-manangement-console-web-server. If webserver is not patched the modules will default to old behaviour.
Comment 9 Florian Best univentionstaff 2015-04-28 16:43:46 CEST
> r60070 | Bug #32331 : added support for uploading multiple files at once
OK

(In reply to Drees Dormann from comment #8)
> revision r60074
> 
> (In reply to Alexander Kläser from comment #7)
> > Referring to [r59852]: Please use a check similar to (!(fileInfo instanceof
> > Array)) instead of ('name' in fileInfo), this reads IMHO better.
> 
> had to use this check since fileInfo always is an array.
REOPEN: No, it is not if one did not update the frontend package.
Please adapt this.

REOPEN: Changelog is missing.
Comment 10 Florian Best univentionstaff 2015-04-28 17:03:18 CEST
Created attachment 6861 [details]
outside loop

Please also apply the patch. Don't execute things more often in the loop when it can be done before.
Comment 11 Drees Dormann univentionstaff 2015-04-29 13:06:07 CEST
added changelog entry, also applied patch and fixed the check
Comment 12 Florian Best univentionstaff 2015-04-30 13:23:17 CEST
OK:

I adjusted the changelog entry in svn r60327.
Comment 13 Johannes Keiser univentionstaff 2015-04-30 17:59:57 CEST
In the german translation when trying to delete distributed files the files that cannot be deleted are not listed.
Comment 14 Florian Best univentionstaff 2015-04-30 18:04:47 CEST
I fixed it, Johannes please make QA.
Comment 15 Johannes Keiser univentionstaff 2015-04-30 19:26:43 CEST
Files that cannot be deleted are not correctly listed in the german popup dialog
Comment 16 Florian Best univentionstaff 2015-05-11 19:24:48 CEST
UCS@school 4.0 R2 v1 has been released:
http://docs.univention.de/release-notes-ucsschool-4.0R2v1-de.html

If this error occurs again, please use "Clone This Bug".