当前位置:网站首页>Laravel upload file information acquisition
Laravel upload file information acquisition
2022-06-09 22:43:00 【Know the black and accept the white】
Read the directory
Laravel file Upload file information acquisition
Get uploaded files
$file=$request->file('file');
Check if the uploaded file is legal , The return value is true or false
$file->isValid()
Get the file name of the uploaded file ( With suffix , Such as abc.png)
$filename=$file->getClientOriginalName();
Get the suffix of the uploaded file ( Such as abc.png, What we get is png)
$fileextension=$file->getClientOriginalExtension();
Get the size of the uploaded file
$filesize=$file->getClientSize();
Get cache in tmp File name under directory ( With suffix , Such as php8933.tmp)
$filaname=$file->getFilename();
Get the uploaded file cache in tmp Absolute path under folder
$realpath=$file->getRealPath();
Cache in tmp Move the files in the directory to a certain location , It returns the path of the file after it has been moved
$path=$file->move(path,newname);
move () Method has two parameters :
The first parameter is the path of the file to which folder
The second parameter is to rename the uploaded file
Get the upload file Mime type (image/png)
$file->getClientMimeType()
边栏推荐
- 元宇宙并非法外之地,该如何保护个人权益?
- 华为设备配置Hub and Spoke
- 先睹为快!Benji Bananas 第一季奖励活动数据一览!
- Please ask a question, Flink SQL. Do you want to specify a time point to start reading data? Can we do this?
- lua学习笔记(4)-- 搭建mobdebug 远程开发环境
- Analyzing native crash using addr2line
- 原来树状数组可以这么简单?
- YUV format and RGB format
- 【图像分割】基于各向异性热扩散方程的图像分割附matlab代码
- 【刷题篇】布尔运算
猜你喜欢

【图像去噪】基于高斯、均值、中值、双边滤波实现图像去噪含Matlab源码

Leetcode(力扣)超高频题讲解(一)

Que se passe - t - il si vous appliquez 8G sur une machine avec 4go de mémoire physique?

Find my product | the new TWS headset supports the find my function, and apple find my is more widely used in third-party manufacturers
![[image reconstruction] regularization based image super-resolution reconstruction with matlab code](/img/30/9ed42f3099ddb741352e26272e9c3d.png)
[image reconstruction] regularization based image super-resolution reconstruction with matlab code

元宇宙并非法外之地,该如何保护个人权益?

How to use sqlplus to remotely connect ASM instances

Leetcode(力扣)超高频题讲解(二)

The fourth paradigm chenyuqiang: the next generation technology of enterprise intelligent decision-making "reinforcement learning + environmental learning"

Light detection and ranging (LIDAR)
随机推荐
MongoDB的使用及CRUD操作
JS 用正则表达式,验证密码包含数字和字母的方法
Find my technology | in the era of Internet of things, apple find my realizes real intelligent loss prevention
[image encryption and decryption] image encryption and decryption based on chaotic sequence combined with dwt+svd (including correlation test) including Matlab source code
定义requestAnimationFrame一秒执行一次
Laravel 上传文件信息获取
[image reconstruction] regularization based image super-resolution reconstruction with matlab code
[image segmentation] image segmentation based on anisotropic thermal diffusion equation with matlab code
10个常见触发IO瓶颈的高频业务场景
Do your filial duty to make an old people's fall prevention alarm system for your family
【图像去噪】基于高斯、均值、中值、双边滤波实现图像去噪含Matlab源码
GUI 用户登录
M-arch (fanwai 14) gd32l233 evaluation - driving segment code LCD
86. (leaflet house) leaflet military plotting - collection of linear arrows
Technology sharing behind NFT and opensea transactions
[translation paper] a progressive morphological filter for removing nonground measurements from airport lidar dat
Lua learning notes (4) -- building mobdebug remote development environment
Analyzing native crash using addr2line
M-Arch(番外10)GD32L233评测-SPI驱动DS1302
从小开始勤奋