Allow multiple file upload



are there plans to allow users to upload multipe files in one step? This would be very helpful for uploading images and supplementary files.


1 Like

Hi @lilients,

We’ve spoken about this a little, but don’t have concrete plans yet. There are two steps to uploading a file: choosing and uploading the file, and then entering its metadata. How would you visualize doing this in a multiple file upload scenario? Note that Wordpress does this, so perhaps that would serve as a good example.

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

we did only look at the image upload for html galleys. Other multiple uploads (supplementary files at the submission) may be useful, but the image upload is of interest for us and the metadata can be read from the $_FILES array, so no user generated metadata is needed.

We looked at the uploadImage() in, that calls uploadPublicFile() in As you wrote, the metadata and the file upload needs to be implemented for each file. So all functions, that access the $_FILES array need to be replaced by a function, that goes through the array. If we understand correctly this would be the following functions:

handleUpload() in that uploads the metadata (like size of the file, original filename, etc.) and
uploadFile($name, $dest) in that uploads the file itself.

Surely other changes need to be made (like the destination path for each file).
We are not sure, how this could be implemented. New function like handleMultipleUpload() (that saves all metadata of all files) and uploadMultipleFile() (that stores all file) could be added and called in uploadPublicFile() in or uploadImage() in
A multiple form element needs to be added to the template (templates/submission/layout/galleyForm.tpl), so a multiple upload can be triggered.

That’s how far we thought. What do you think?

All the best,

I think this is more than useful: it’s a must have! Uploading HTML/XML is a pain. A big improvement would be (as step 1):

If I have successfully uploaded the »article text«, show a button »Add dependend file« on the tab »3. Confirm«.

This would save a lot of clicks.

And please: Work on multiple file uploads for one Galley!