Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Upload class and extension case
AdamW
February 2014
Hi
I'm looking for a way to set all uploaded files extensions in lowercase with the Upload class. Can we do that ?
Thanks.
Harro
February 2014
Accepted Answer
Yes, you can.
You need to register a 'before' event, which gets passed the file info array build up to that point. It is passed by reference, so you can change values in it.
There's an example in the docs, with a closure that does a similar change.
AdamW
February 2014
Nice, i'll do it. Thanks !
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
AdamW
February 2014
Harro
February 2014