Advanced search  

News:

cpg1.5.44 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.42 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Ignore certain file types  (Read 6113 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Ignore certain file types
« on: March 13, 2013, 03: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?
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #1 on: March 13, 2013, 03: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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15249
Re: Ignore certain file types
« Reply #2 on: March 13, 2013, 03: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
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #3 on: March 13, 2013, 04: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. 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15249
Re: Ignore certain file types
« Reply #4 on: March 13, 2013, 04: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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15249
Re: Ignore certain file types
« Reply #5 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.
Logged

avery-t

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Ignore certain file types
« Reply #6 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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15249
Re: Ignore certain file types
« Reply #7 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.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Ignore certain file types
« Reply #8 on: May 02, 2013, 04:10:40 AM »

This works great.  Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15249
Re: Ignore certain file types
« Reply #9 on: May 02, 2013, 03:46:23 PM »

Committed in SVN revision 8563.
Logged
Pages: [1]   Go Up
 

Page created in 0.066 seconds with 20 queries.