You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I then created a custom file namer, I do not want my image and its conversions to share a name. A user can reverse engineer and I am trying to avoid that.
function (string$path) use ($conversions, $media) {
foreach ($conversionsas$conversion) {
if (Str::contains($path, pathinfo($media->file_name, PATHINFO_FILENAME).'-'.$conversion)) {
returntrue;
}
}
returnfalse;
}
);
According to L72, only deletable conversations are files with a naming pattern like filename-conversionname which is not whats not set on my new file namer.
One can write a new file_remover_class or wire an extra media delete observer but cant we have this natively in the package.
Thanks
The text was updated successfully, but these errors were encountered:
Hello @spatie, great package you have here.
Its probably documented somewhere but I am having issues deleting obsolete files when I add new ones.
I defined a collection to keep only 3 files.
I then created a custom file namer, I do not want my image and its conversions to share a name. A user can reverse engineer and I am trying to avoid that.
Basically I am md5ing the original file name and the resultant file name so they cant be similar.
Examples are shown below.
The furthest I could go investigating was upto these lines below when deleting the conversions, still to inspect the other removers.
laravel-medialibrary/src/Support/FileRemover/DefaultFileRemover.php
Lines 68 to 79 in 5486261
According to L72, only deletable conversations are files with a naming pattern like
filename-conversionname
which is not whats not set on my new file namer.One can write a new
file_remover_class
or wire an extra media delete observer but cant we have this natively in the package.Thanks
The text was updated successfully, but these errors were encountered: