forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: pols1337 on March 13, 2013, 02:22:13 am

Title: Ignore certain file types
Post by: pols1337 on March 13, 2013, 02:22:13 am
Hi, quick question: is there a way, when using the Admin's batch upload tool, to skip over or ignore certain file types? 

For example, when I upload my folders using FTP, those folders usually contain some trash files like picasa.ini, thumbs.db, and some about.txt text files for my own personal use.  When I use the batch upload, CPG wants to add those miscellaneous file types to my album.  Although I can manually un-check those particular files from being added, it gets very tiring after awhile.  Thus, is there a way for Coppermine to intelligently ignore those files?
Title: Re: Ignore certain file types
Post by: pols1337 on March 13, 2013, 02:26:37 am
By the way, yes, I've gone to look at the Config > File Settings > Allowed file types

Unfortunately, I see no way to tell Coppermine to skip certain files like picasa.ini and thumbs.db
Title: Re: Ignore certain file types
Post by: Αndré on March 13, 2013, 02:44:39 pm
They'll be skipped automatically. Instead of the tick icon you'll get a radar icon with a title like
Quote
Only files with the following extensions are accepted: jpg/jpeg/gif/png/psd/asf/asx/mpg/mpeg/wmv/swf/avi/mov/mp3/midi/mid/wma/wav/ogg/doc/xls/pdf/zip/flv/mp4/aac/ttf/youtube
Title: Re: Ignore certain file types
Post by: pols1337 on March 13, 2013, 03:06:34 pm
Yes I see the radar icon but the batch uploading process stops on that page, instead of automatically moving to the next page to edit individual files. 
Title: Re: Ignore certain file types
Post by: Αndré on March 13, 2013, 03:10:58 pm
I think we could automatically uncheck unsupported file types at the batch-add form. I'll try to create a mod as soon as possible.
Title: Re: Ignore certain file types
Post by: Αndré on April 10, 2013, 01:50:44 pm
Open searchnew.php, find
Code: [Select]
$checked = isset($expic_array[$picfile_replaced_forbidden]) ? '' : 'checked="checked"';and replace with
Code: [Select]
$checked = isset($expic_array[$picfile_replaced_forbidden]) || !is_known_filetype($pic_fname) ? '' : 'checked="checked"';
Please report if it works as expected.
Title: Re: Ignore certain file types
Post by: avery-t on April 12, 2013, 06:46:17 am
Hi, quick question: is there a way, when using the Admin's batch upload tool, to skip over or ignore certain file types? 

For example, when I upload my folders using FTP, those folders usually contain some trash files like picasa.ini, thumbs.db, and some about.txt text files for my own personal use.  When I use the batch upload, CPG wants to add those miscellaneous file types to my album.  Although I can manually un-check those particular files from being added, it gets very tiring after awhile.  Thus, is there a way for Coppermine to intelligently ignore those files?

Wouldn't the easiest solution be to upload only the image file?
Title: Re: Ignore certain file types
Post by: Αndré on April 12, 2013, 09:23:13 am
Wouldn't the easiest solution be to upload only the image file?
Sure, but some people don't upload pictures to their (external) gallery, but use already existing file/folder structure and/or need to keep the other files in their directories.
Title: Re: Ignore certain file types
Post by: pols1337 on May 02, 2013, 04:10:40 am
This works great.  Thanks.
Title: Re: Ignore certain file types
Post by: Αndré on May 02, 2013, 03:46:23 pm
Committed in SVN revision 8563.