implemented a lot of security measures
This commit is contained in:
@@ -30,8 +30,10 @@ class BackfillThumbnails extends Command
|
||||
$destRel = "events/{$r->event_id}/photos/thumbs/{$baseName}_thumb.jpg";
|
||||
$made = ImageHelper::makeThumbnailOnDisk('public', $orig, $destRel, 640, 82);
|
||||
if ($made) {
|
||||
$url = Storage::url($made);
|
||||
DB::table('photos')->where('id', $r->id)->update(['thumbnail_path' => $url, 'updated_at' => now()]);
|
||||
DB::table('photos')->where('id', $r->id)->update([
|
||||
'thumbnail_path' => $made,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$count++;
|
||||
$this->line("Photo {$r->id}: thumb created");
|
||||
}
|
||||
@@ -50,4 +52,3 @@ class BackfillThumbnails extends Command
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user