Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/Concerns/ProcessHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ private function preCreate(TusHookInput $payload)
$upload = $this->uploads->findByUploadRequestAndToken($requestId, $token);

if(is_null($upload)){
Log::info("Upload identified by {$requestId}-{$token} not existing.");
Log::info("Upload not existing.", [
'identifier' => "{$requestId}-{$token}",
]);
throw new Exception('Upload not found, continuation not granted');
}

Expand Down Expand Up @@ -98,7 +100,9 @@ private function postFinish(TusHookInput $payload)
$upload = $this->uploads->findByUploadRequestAndToken($requestId, $token);

if(is_null($upload)){
Log::error("Tus post finish, upload {$requestId}-{$token} not found.");
Log::error("Tus post finish, upload not found.", [
'identifier' => "{$requestId}-{$token}",
]);
return false;
}

Expand All @@ -124,7 +128,9 @@ private function postTerminate(TusHookInput $payload)
$upload = $this->uploads->findByUploadRequestAndToken($requestId, $token);

if(is_null($upload)){
Log::error("Upload {$requestId}-{$token} not found.");
Log::error("Upload not found.", [
'identifier' => "{$requestId}-{$token}",
]);
return false;
}

Expand Down