Support the ongoing development of Laravel.io →
Requests Input Views

Hi,

I created an uploaded facility. Kindly see the the view and controller below :

VIEW

<form action="{{ URL::route('postUploadPdf') }}" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="the-pdf" id="the-pdf"><br> {{ Form::token() }} <input type="submit" name="submit" value="Submit"> </form>

CONTROLLER

Input::file('the-pdf')->move('../uploads');

How can I move it to that folder with the same copy of the original pdf file, not a *.tmp file.

Last updated 3 years ago.
0
$filename = 'myfile.pdf';
Input::file('the-pdf')->move('../uploads', $filename);
Last updated 3 years ago.
0

wow.. Thanks dude mgsmus for helping me :D it works!! :D

Last updated 3 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.

© 2025 Laravel.io - All rights reserved.