Closed (outdated)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Mar 2012 at 23:29 UTC
Updated:
25 Jan 2019 at 21:05 UTC
Jump to comment: Most recent
Comments
Comment #1
jonathan_hunt commentedNeeds review.
Comment #2
jonathan_hunt commentedI meant to say that the current advice of *.jpg|*.gif. didn't work for me whereas *.{jpg|gif} did.
Comment #3
sylus commentedIs it possible to do a recursive search on multiple directories, can't seem to get this working with glob.
Comment #4
willvincent commented@sylus: I've just created an issue, and supplied a patch to allow recursion into subdirectories: #1902586: Support recursion into subdirectories for file import
Comment #5
willvincent commentedNeither *.jpg|*.gif, nor *.{jpg|gif} work for me.
However, *.{jpg,gif} does.
According to the PHP docs for glob(), GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', or 'c'
What I'm unclear on is if it then would have to be {*.jpg,*.gif} or if the *. before the curly brace is correct and any comma separated values within it are appended to that *.
In either case, as it's currently implemented in the module it is incorrect, and the patch supplied above is also incorrect.
Comment #6
willvincent commentedComment #7
dave reidJust an FYI that I committed some major improvements to the import screen to try and help clear things up a little bit: http://drupalcode.org/project/media.git/commit/d460ba9. We're now using file_scan_directory() and a syntax more similar to existing patterns that people know, like the Block page visibility settings, supporting * as a wildcard and entering one pattern per line.
Not sure if this improvement should be backported to the 1.x branch.
Comment #8
chris matthews commentedClosing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team