Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Upload class and extension case
  • Hi

    I'm looking for a way to set all uploaded files extensions in lowercase with the Upload class. Can we do that ?

    Thanks.
  • HarroHarro
    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.
  • Nice, i'll do it. Thanks !

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion