Skip to content

Commit 2e05fd9

Browse files
authored
Log form number and file size for form upload submissions (#20061)
1 parent 6d13b20 commit 2e05fd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/simple_forms_api/app/controllers/simple_forms_api/v1/scanned_form_uploads_controller.rb

+5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ def upload_response
3434
stamper.stamp_pdf
3535
metadata = validated_metadata
3636
status, confirmation_number = upload_pdf(file_path, metadata)
37+
file_size = File.size(file_path).to_f / (2**20)
3738

39+
Rails.logger.info(
40+
'Simple forms api - scanned form uploaded',
41+
{ form_number: params[:form_number], status:, confirmation_number:, file_size: }
42+
)
3843
{ confirmation_number:, status: }
3944
end
4045

0 commit comments

Comments
 (0)