0

我托管我的 laravel 站点aswaktinghir.ma,我尝试使用这些图像添加用户,插入成功完成,但配置文件图像未显示,我不知道图像是否转发到 rootpublic\ storage \ profiles \ October2020以及何时打开fillezilla 中的存储文件夹,查看是否有要插入的图像,它给了我错误550 Can't change directory to /public/storage: No such file or directory,知道它在本地运行良好。

注册控制器.php

  if($request->hasFile('image'))
       {
        $image = $request->file('image'); 
        //crypt image and rename the image/s by its root
        $imagee = md5($image);
        $image->storeAs("aswakfolder\public\profiles\\".$jdate->format('F').$jdate->year,$imagee.'.'.$image->extension());
        $user->image = "aswakfolder\\public\\storage\\profiles\\".$jdate->format('F').$jdate->year."\\".$imagee.'.'.$image->extension(); 
        }
        $im = $user->image;  
        //images
        $dataim = array();
         if($request->hasFile('images')) 
         {
            foreach($request->file('images') as $file) 
            {
                $namee = md5($file->getClientOriginalName()).'.'.$file->extension();
                $name = "aswakfolder\public\storage\profiles\\".$jdate->format('F').$jdate->year."\\".$namee;
                $file->storeAs("aswakfolder\\public\\profiles\\".$jdate->format('F').$jdate->year, $namee);  
                array_push($dataim,$name);
            } 
         }
4

0 回答 0