View Issue Details

IDProjectCategoryView StatusLast Update
0000687Composrgalleriespublic2017-11-26 16:07
ReporterDuckAssigned ToChris Graham 
SeverityFeature-request 
Status closedResolutionwon't fix 
Product Version 
Fixed in Version 
Summary0000687: Galleries Bulk Upload - Allow CSV in TAR file and allow Title field
DescriptionNot 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.
Additional InformationIf I have time this week I will try and tackle this myself.
TagsNo tags attached.
Time estimation (hours)2
Sponsorship open

Activities

Duck

2012-10-17 16:02

reporter   ~0001037

I've been looking into tackling this but it is far more complex than I anticipated. I cannot get my head around a feasible approach. Since the bulkupload works by reading entries in the zip file and performing necessary actions upon each one as it is read I do not see how I can be sure that a CSV file is the first one read and then how to deal with its contents in a scalable fashion? I mean even if I run thru with searching for the CSV first how do I then store the CSV info so it can be referenced when adding a new image or video entry? If I put it all in an array to reference then I imagine that could be a huge array if it is thousands of images and could/would this not cause memory problems? At this point I am suffering a "Coders Block" on how to proceed. I may have to leave this for sponsorship for Magician Chris to handle?

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

Chris Graham

2012-10-17 16:12

administrator   ~0001038

Sounds right.

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.

Chris Graham

2017-11-26 16:07

administrator   ~0005264

We are dropping uploading zips in v11 because you can mass select in upload widgets nowadays.

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.

Issue History

Date Modified Username Field Change
2017-11-26 16:07 Chris Graham Note Added: 0005264
2017-11-26 16:07 Chris Graham Status non-assigned => closed
2017-11-26 16:07 Chris Graham Assigned To => Chris Graham
2017-11-26 16:07 Chris Graham Resolution open => won't fix