I just don’t get it, why won’t it upload the photo.
Having the following in my Input::all():
Array
(
[name] => p17fp1pnaa1gpr5otdg1ba3fd4v.jpg
[file] => Array
(
[name] => tumblr_ltaruq6XCH1qc4lrfo4_400.jpg
[type] => image/jpeg
[tmp_name] => C:\xampp\tmp\php9A20.tmp
[error] => 0
[size] => 48382
)
)
I try to upload the file to a tmp dir, but it won’t do it…
$tmp_input = Input::all();
#$tmp_input = $tmp_input['file'];
Input::upload('photo', path('public').'uploads/tmp', $tmp_input['file']['name']);
$tmp_input['file']['name'] or $tmp_input['name'], doesn’t work either
Yes, the uploads/tmp folder exists. Am I missing something from the syntax for which won’t it do the upload?
Just so others may know, I had to use
move_uploaded_file()function as I couldn’t upload the file with any function of Laravel.so this is what I did