mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 00:05:29 +00:00
Fixes #1852
This commit is contained in:
parent
575c4dd7e5
commit
67a90ee18d
1 changed files with 2 additions and 2 deletions
|
@ -193,11 +193,11 @@ class BaseApiController extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showTempMedia(Request $request, int $profileId, $mediaId, $timestamp)
|
public function showTempMedia(Request $request, $profileId, $mediaId, $timestamp)
|
||||||
{
|
{
|
||||||
abort_if(!$request->user(), 403);
|
abort_if(!$request->user(), 403);
|
||||||
abort_if(!$request->hasValidSignature(), 404);
|
abort_if(!$request->hasValidSignature(), 404);
|
||||||
abort_if(Auth::user()->profile_id !== $profileId, 404);
|
abort_if(Auth::user()->profile_id != $profileId, 404);
|
||||||
$media = Media::whereProfileId(Auth::user()->profile_id)->findOrFail($mediaId);
|
$media = Media::whereProfileId(Auth::user()->profile_id)->findOrFail($mediaId);
|
||||||
$path = storage_path('app/'.$media->media_path);
|
$path = storage_path('app/'.$media->media_path);
|
||||||
return response()->file($path);
|
return response()->file($path);
|
||||||
|
|
Loading…
Reference in a new issue