Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel getclientoriginalextension

if($request->hasFile('photos')){
if (Input::file('photos')->isValid()) {
    $file = Input::file('photos');
    $destination = 'images/Foldername'.'/';
    $ext= $file->getClientOriginalExtension();
    $mainFilename = str_random(6).date('h-i-s');
    $file->move($destination, $mainFilename.".".$ext);
    echo "uploaded successfully";
}
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #getclientoriginalextension
ADD COMMENT
Topic
Name
5+7 =