Tp5 uploads pictures to the picture server

due to the problem of the company"s project, there are a lot of visits. I want to build a picture server and ask how to modify the existing method of saving img to submit img and save it to the picture server.

related codes

private function _ uploadImg () {

    $img = "";
    if(isset($_FILES["img"]) && !empty($_FILES["img"]["name"])){
        $file = request()->file("img");
        // /public/uploads/ 
        $path = config("uploads_path").$this->controller_name."/";
        $info = $file->move(ROOT_PATH.$path);
        if($info){
            $img = "/uploads/".$this->controller_name."/".str_replace("\\","/",$info->getSaveName());
        }else{
            // 
            request()->isAjax() ? $this->ajaxReturn(0,$file->getError()) : $this->error($file->getError());
        }
    }
    return $img;
}

Apr.08,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b370bc-2b7dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b370bc-2b7dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?