use Exception;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Storage;
use Illuminate\Support\MessageBag;
use Illuminate\Validation\ValidationException;
$attachmentStream = $this->attachmentService->streamAttachmentFromStorage($attachment);
if ($request->get('open') === 'true') {
- return $this->streamedInlineDownloadResponse($attachmentStream, $fileName);
+ return $this->download()->streamedInline($attachmentStream, $fileName);
}
- return $this->streamedDownloadResponse($attachmentStream, $fileName);
+ return $this->download()->streamedDirectly($attachmentStream, $fileName);
}
/**