#687 - Galleries Bulk Upload - Allow CSV in TAR file and allow Title field
0 guests and 0 members have recently viewed this.
The top 3 point earners from 14th Dec 2025 to 21st Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| sholzy |
|
|
There are no events at this time
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.