Hello,
For a site on which I am working we have need of a basic image gallery. We don't need complicated functionality, just the basics: a gallery is owned by a user and contains multiple images through which other users can browse. To that end I've been looking at shazamgallery, which is at right level of functionality. However, it handles images a little backwards. When uploading an image you select the gallery to which they belong, rather than uploading a set of images when the gallery is created. The shazamgallery page states that they will never support batch upload because image_import does, but image_import appears to require either shell or FTP access, which is mind-blazingly stupid for a large site whose user-base is not technically oriented. If I'm mistaken about this I'll gladly be corrected.
In any event, I want to modify the gallery submission form to contain multiple file selection elements. This is not the problem, but rather I don't know the "drupal way" to handle multiple file uploads. This page describes the process for a single image, but the multi-file case is different. My form produces elements with names edit[images][0...n], where n is some fixed number (say, 20). However, if I stop the form processing and dump $_FILES and $node I see nothing in the former and $node->images is a big array of NULL entries. What is the correct (i.e., "drupal") way to handle this situation?
Thanks.
Comments
I wish I knew...
I'm pretty experienced with the Drupal forms API, but I'm stuck on this one too. Without the Drupal forms API I could do this fairly easily, but I don't want to create a fixed number of input fields (I want to use Javascript to create new instances of my form field) and the Drupal forms API doesn't allow you to submit form data for fields that weren't there in the first place (they were created at runtime by Javascript).
Anyone have a suggestion?
Any changes
Half a year has gone. Had anyone found any solution?