hasValidSignature(), 403); abort_unless($this->storage->isEnhancePath($enhanceJob->source_path), 404); try { $binary = $this->storage->fetchSourceBinary($enhanceJob); } catch (Throwable) { abort(404); } return response($binary, 200, [ 'Content-Type' => trim((string) ($enhanceJob->input_mime ?: 'application/octet-stream')), 'Content-Length' => (string) strlen($binary), 'Cache-Control' => 'private, max-age=60', 'Content-Disposition' => 'inline; filename="enhance-source-' . $enhanceJob->id . '"', ]); } }