Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 3 months 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 3 months ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.