Storage support for local disk (#165)

* Storage support for local disk

* UI change ai feature page

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
formsdev
2023-08-16 14:29:07 +05:30
committed by GitHub
parent c42c7ca97c
commit 3c71be5d45
12 changed files with 99 additions and 20 deletions

View File

@@ -66,14 +66,14 @@ class PublicFormController extends Controller
public function showAsset($assetFileName)
{
$path = FormController::ASSETS_UPLOAD_PATH.'/'.$assetFileName;
if (!Storage::disk('s3')->exists($path)) {
if (!Storage::exists($path)) {
return $this->error([
'message' => 'File not found.',
'file_name' => $assetFileName
]);
}
return redirect()->to(Storage::disk('s3')->temporaryUrl($path, now()->addMinutes(5)));
return redirect()->to(Storage::temporaryUrl($path, now()->addMinutes(5)));
}
public function answer(AnswerFormRequest $request)