#687 - Galleries Bulk Upload - Allow CSV in TAR file and allow Title field
| Identifier | #687 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Galleries Bulk Upload - Allow CSV in TAR file and allow Title field |
| Status | Closed (rejected) |
| Handling member | Chris Graham |
| Addon | galleries |
| Description | Not sure if these should be Tracker items or not but I would like to see the bulk upload discern a CSV file if included in the TAR file.
Also I would like to see the CSV to allow for an inclusion of a Title tag since galleries now support that. |
| Steps to reproduce | |
| Additional information | If I have time this week I will try and tackle this myself. |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
So far I believe the following files and functions will need modifying:
cms/pages/modules/cms_galerries.php
function ___gimp - To read the CSV and store the map somewhere?
function store_from_archive - To accept a title and description (as optional) and pass to simple_add
function simple_add - To accept a title and description (as optional) and pass to galleries 2 image_add and video_add
sources/galleries2.php
functions image_add and video_add - check to see that if $title and $comment have values sent and use them if not use the current method of using exif data
I also suppose a new function for seeking and reading the CSV file will need to be added to cms/pages/modules/cms_galerries.php
Fair point about CSV size.
It would indeed be hard to solve. It's a typical speed vs memory trade-off issue. You could spool it into a temporary file, but you'd need to keep re-reading that. Or you could dump it in the database for efficient querying, but that's way over-complex.
If I were you I'd just document that the file shouldn't be too huge.
Call Composr's disable_php_memory_limit() function before the import starts. Composr will do its best to remove all memory limits, and if that fails -- well, users with huge amounts of data have an onus to have at least some control over their server settings.
So this feature won't apply.
Going forward with expectations of UI quality, it's not realistic users are going to juggle zip files around to upload stuff.