Use current date (Y/m/d) as custom path #3019
Unanswered
holymp2006
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How can one use
date('Y')
,date('m')
, anddate('d')
as custom path, when creating a file?I need to change the media paths to something like
/base/2022/08/24/md5(xxxxxxxx)/filename.pdf
.I have figured out how this might be done when retrieving the media, by extending and modifying the
BasePathGenerator
class as so:But how do I save a file to
"/base/date('Y/m/d') . '/'..."
?Beta Was this translation helpful? Give feedback.
All reactions