mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update MediaController, add timestamp to signed preview url
This commit is contained in:
parent
79292ad610
commit
49efaae96c
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class MediaController extends Controller
|
||||||
$path = $photo->storeAs($dir, $name);
|
$path = $photo->storeAs($dir, $name);
|
||||||
$res = [];
|
$res = [];
|
||||||
$res['url'] = URL::temporarySignedRoute(
|
$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);
|
ImageOptimize::dispatch($media);
|
||||||
return $res;
|
return $res;
|
||||||
|
|
Loading…
Reference in a new issue