Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get image name and extension laravel

$file = $request->file('filename')->getClientOriginalName();

$filename = pathinfo($file, PATHINFO_FILENAME);
$extension = pathinfo($file, PATHINFO_EXTENSION);

// Please do comment if you have a better approach
// We all here to find shorter and faster way to get things done
// Thank you
Comment

laravel get image extension

$extension = pathinfo(storage_path('/uploads/my_image.jpg'), PATHINFO_EXTENSION);
dd($extension);
Comment

PREVIOUS NEXT
Code Example
Php :: how to debug in php 
Php :: forelse laravel 
Php :: wpml display language switcher 
Php :: how to link external php file to html 
Php :: laravel child relation order by desc 
Php :: php 8 major changes - Nullsafe operator 
Php :: laravel store multiple files 
Php :: laravel checkbox terms and conditions 
Php :: check empty laravel blade 
Php :: drupal 9 enable PHP errors 
Php :: str_replace php variable 
Php :: jetstream seed user with team 
Php :: for i php 
Php :: woocommerce if it is shop page remove breadcrumbs 
Php :: laravel get only relationship 
Php :: php base64 encoded image to png 
Php :: php trim array to certain length 
Php :: php verify associative array key eixsts 
Php :: yii2 get action class in view 
Php :: change font family in echo php 
Php :: php json request get value 
Php :: run laravel mix 
Php :: filemtime($current_file_name); 
Php :: php subtract seconds from datetime 
Php :: how to convert string word to lowercase in php 
Php :: woocommerce add custom field data to cart page 
Php :: laravel check pagination in blade 
Php :: woocommerce search form <?php get_search_form(); ? 
Php :: time duration calculation laravel 
Php :: php connect ms sql server 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =