URL generation (front&back) + fixed authJWT for SSR

This commit is contained in:
Julien Nahum
2024-01-11 14:07:27 +01:00
parent 630ae1df1d
commit 5a3978874a
18 changed files with 81 additions and 21 deletions

View File

@@ -164,14 +164,14 @@ class StoreFormSubmissionJob implements ShouldQueue
return null;
}
if(filter_var($value, FILTER_VALIDATE_URL) !== FALSE && str_contains($value, parse_url(config('app.url'))['host'])) { // In case of prefill we have full url so convert to s3
if(filter_var($value, FILTER_VALIDATE_URL) !== false && str_contains($value, parse_url(config('app.url'))['host'])) { // In case of prefill we have full url so convert to s3
$fileName = basename($value);
$path = FormController::ASSETS_UPLOAD_PATH . '/' . $fileName;
$newPath = Str::of(PublicFormController::FILE_UPLOAD_PATH)->replace('?', $this->form->id);
Storage::move($path, $newPath.'/'.$fileName);
return $fileName;
}
if($this->isSkipForUpload($value)) {
return $value;
}