Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better default upload path #10

Open
ProLoser opened this issue Nov 21, 2011 · 0 comments
Open

Better default upload path #10

ProLoser opened this issue Nov 21, 2011 · 0 comments

Comments

@ProLoser
Copy link

I changed the default path from:
'path' => ':webroot/upload/:model/:id/:basename_:style.:extension',
to:
'path' => ':webroot/upload/:model/:id/:style-:basename.:extension',

The REASON I did this was because I no longer need to use a helper to access files. I can simply hardcode the paths like this:

'path/to/' . $id . '/thumb-' . $filename

It doesn't make sense to have the extra load of a helper just to break apart a file's name and extension just to insert the style in the middle. Simply attaching it to the beginning of the file removes the need for the helper altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant