wildcard_path_match? question #19

Closed
alexandru-calinoiu opened this Issue Mar 18, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@alexandru-calinoiu

Hi,

I am trying to filter paths like:
/articole/test-4f663e6d8cb2432583000055/imagini

With:
config.middleware.use 'Rack::RawUpload', :paths => ['/articole/.*/imagini']

This should normaly work with a regex but the wildcard_path_match? method is relacing the * any particulat reasons for this? Any other way I can achive the above?

Thanks,

@pablobm

This comment has been minimized.

Show comment Hide comment
@pablobm

pablobm Mar 24, 2012

Member

OK, I see. That feature is intended for use with wildcards, not with regular expressions. This means that "blah.*" resolves to anything starting with "blah.", as opposed to anything starting with "blah". Think of it as bash filename wildcards.

In your example, you sould be using the following line:

config.middleware.use 'Rack::RawUpload', :paths => ['/articole/*/imagini']
Member

pablobm commented Mar 24, 2012

OK, I see. That feature is intended for use with wildcards, not with regular expressions. This means that "blah.*" resolves to anything starting with "blah.", as opposed to anything starting with "blah". Think of it as bash filename wildcards.

In your example, you sould be using the following line:

config.middleware.use 'Rack::RawUpload', :paths => ['/articole/*/imagini']

@pablobm pablobm closed this Mar 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment