1. Using the laravel framework, and then the port is 8088, in the server test upload is normal, but upload on other computers will report an error, prompting insufficient permissions, I posted the code below, please help.
2 Code
Custom in filesystems.php
"upload" => [
"driver" => "local",
"root" => public_path("uploads/assets"),
],
Controller
//
public function asset_picture_upload(Request $request){
$file = $request->file("picture");
//
$ext = $file ->getClientOriginalExtension();
//
$path = $file -> getRealPath();
$filename = date("Y-m-d-H-i-s")."-".uniqid().".".$ext;
//
$bool = Storage::disk("upload") -> put($filename,file_get_contents($path));
return $data = ["code"=>0,"data"=>$path];
}
the above is successful in the server test, but errors will be reported in other calculations. Guess whether it is due to the port problem. The screenshot of the error report is as follows: