department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Implement page size limit and error message #90383

Open steele-lm opened 2 months ago

steele-lm commented 2 months ago

Issue Description

_Claim attachments submitted through Data Dimensions are limited to a page size of 78"x101". If the page size exceeds that amount, the attachment fails to submit, but the user is not currently notified. The Burial, PCPG, VRE, and 686/674 form need to check for page size and then show an error to the user when they attempt to upload a page that is too large._

See similar work on the 526 here, and they suggest reading the file content and extracting the image dimensions. The 'pdjs-dist' library (already installed) might be used to find a PDF's dimensions.

CAIA approved error message: Your file can't have a [width/height] larger than [dimension]. Follow the instructions for your device on how to resize the file and try again.


Tasks

Acceptance Criteria

mjknight50 commented 1 month ago

This is being discussed more broadly and should not be worked on.