Hi guys
why after change post image the old image in storage file will not be delete !!!!!!
That's big bug for increase memory disk !
Hi.
This is a bug indeed.
There are 2 more bugs related:
Thanks for the tip
I believe the above issues have been resolved in other PRs. Closing for now. If this is still an issue after the 1.0 release, please open a new issue
use mutators in case you want to remove old image after update;
f.e.
public function setAvatarUrlAttribute($value)
{
// in case of edit and send new avatar image
if (strtolower(request()->method()) === 'put' && $value !== $this->avatar_url) {
Storage::disk('public')->delete($this->avatar_url);
}
$this->attributes['avatar_url'] = $value;
return $this->attributes['avatar_url'];
}
Please don't comment on issues that have been closed for so long (3 years in this case). It was for a VASTLY different version of Voyager
Most helpful comment
Hi.
This is a bug indeed.
There are 2 more bugs related:
Thanks for the tip