Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API-25894 Save Benefits Intake file sizes #12799

Merged
merged 0 commits into from
May 25, 2023

Conversation

caseywilliams
Copy link
Contributor

@caseywilliams caseywilliams commented May 24, 2023

Summary

  • Adds the file size (in bytes) of all PDFs (main content and attachments) uploaded via the Benefits Intake API to the set of saved metadata JSON

Related issue(s)

Testing done

  • Updated specs

What areas of the site does it impact?

  • Starts including the file sizes of uploaded content and attachments in the saved JSON metadata for VBADocuments::UploadSubmissions alongside the checksum, page dimensions, etc.

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@caseywilliams caseywilliams added Lighthouse lighthouse appeals Lighthouse API appeals banana-peels Lighthouse Banana Peels Team labels May 24, 2023
@caseywilliams caseywilliams requested review from a team as code owners May 24, 2023 23:52
@va-vfs-bot va-vfs-bot temporarily deployed to API-25984/file-size-metadata/main/main May 24, 2023 23:52 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to API-25984/file-size-metadata/main/main May 24, 2023 23:53 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to API-25984/file-size-metadata/main/main May 24, 2023 23:58 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to API-25984/file-size-metadata/main/main May 25, 2023 00:23 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to API-25984/file-size-metadata/main/main May 25, 2023 00:23 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to API-25984/file-size-metadata/main/main May 25, 2023 00:24 In progress
@@ -55,6 +55,10 @@ def page_size_inches
}
end

def file_size
self['File size'].scan(/\d+/).first.to_i
Copy link
Contributor Author

@caseywilliams caseywilliams May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pdfinfo outputs a File size string value formatted like "12040 bytes", for example

Copy link
Contributor

@kristen-brown kristen-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appeals Lighthouse API appeals banana-peels Lighthouse Banana Peels Team console-services-review Lighthouse lighthouse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants