Update MediaController, add timestamp to signed preview url

pull/1789/head
Daniel Supernault 6 years ago
parent 79292ad610
commit 49efaae96c
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -48,7 +48,7 @@ class MediaController extends Controller
$path = $photo->storeAs($dir, $name);
$res = [];
$res['url'] = URL::temporarySignedRoute(
'temp-media', now()->addHours(1), ['profileId' => $media->profile_id, 'mediaId' => $media->id]
'temp-media', now()->addHours(1), ['profileId' => $media->profile_id, 'mediaId' => $media->id, 'timestamp' => time()]
);
ImageOptimize::dispatch($media);
return $res;

Loading…
Cancel
Save