代码如下:
if($file->isValid()){
$namea = $student->name = $data['name'];
$originalName = $file->getClientOriginalName();
header("Content-Type:text/html;charset=UTF-8");
$ext = $file->getClientOriginalName();
$type = $file->getClientMimeType();
$realpath = $file->getRealPath();
$filename = date('Y-m-d-H-i-s').'-'.$ext;
var_dump($ext);
$bool = Storage::disk('create')->put($filename,file_get_contents($realpath));
}
pardon110