From f9a4de6b5b2396798a05aaf3349c9f848e797b03 Mon Sep 17 00:00:00 2001 From: Chirag Chhatrala Date: Thu, 8 Aug 2024 23:20:42 +0530 Subject: [PATCH] fix google sheet image url --- app/Integrations/Google/Sheets/SpreadsheetManager.php | 2 +- app/Service/Forms/FormSubmissionFormatter.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Integrations/Google/Sheets/SpreadsheetManager.php b/app/Integrations/Google/Sheets/SpreadsheetManager.php index 5c674ad8d..77e73bce8 100644 --- a/app/Integrations/Google/Sheets/SpreadsheetManager.php +++ b/app/Integrations/Google/Sheets/SpreadsheetManager.php @@ -129,7 +129,7 @@ protected function setHeaders(string $id, array $headers): static public function buildRow(array $submissionData): array { - $formatter = (new FormSubmissionFormatter($this->integration->form, $submissionData))->outputStringsOnly(); + $formatter = (new FormSubmissionFormatter($this->integration->form, $submissionData))->useSignedUrlForFiles()->outputStringsOnly(); $fields = $formatter->getFieldsWithValue(); diff --git a/app/Service/Forms/FormSubmissionFormatter.php b/app/Service/Forms/FormSubmissionFormatter.php index a9a2465c5..b21317704 100644 --- a/app/Service/Forms/FormSubmissionFormatter.php +++ b/app/Service/Forms/FormSubmissionFormatter.php @@ -145,7 +145,7 @@ public function getCleanKeyValue() } else { $returnArray[$field['name']] = $val; } - } elseif ($field['type'] == 'files') { + } elseif (in_array($field['type'], ['files', 'signature'])) { if ($this->outputStringsOnly) { $formId = $this->form->id; $returnArray[$field['name']] = implode( @@ -219,7 +219,7 @@ public function getFieldsWithValue() } else { $field['value'] = $val; } - } elseif ($field['type'] == 'files') { + } elseif (in_array($field['type'], ['files', 'signature'])) { if ($this->outputStringsOnly) { $formId = $this->form->id; $field['value'] = implode(