Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 2 years ago.
0

From the Docs for Files:

Input::file('photo')->move($destinationPath, $fileName);

$fileName is the new name, so you could set that yourself, for example:

$fileName = Input::get('rename_to');
Input::file('photo')->move($destinationPath, $fileName);

But you need to make sure you deal with different file types and validation.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.