Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Better default upload path #10

@ProLoser

Description

@ProLoser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions