0
Follow
0
View

Avatar resize and delete

dujian0602 注册会员
2023-01-25 21:55

I think we need here more context. But i assume that

$r->avatar->storeAs('users', $filename, 'public');  

stores the file into public folder while

  Storage::delete('users'.'/'.Auth::user()->avatar); 

tries to find the image path within private storage.

Try this out

Storage::disk('public')->delete('users/'.Auth::user()->avatar); 

maybe this will work

About the Author

Question Info

Publish Time
2023-01-25 21:55
Update Time
2023-01-25 21:55