Repository navigation
Aakash - Jobs Component: show the upload size limit on the job application form - #5674
Merged
one-community merged 1 commit intoOct 23, 2026
Merged
Conversation
Reject resume and per-question attachments over 5 MB on selection, matching the new server limit, and show an inline 'File too large, max 5 MB.' error under the file field using the existing fieldError style (dark mode already covered). Adds a Vitest test.
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
pixelpix13
approved these changes
Oct 21, 2026
pixelpix13
left a comment
Contributor
There was a problem hiding this comment.
Approved
Reviewed against Bug #60 (frontend half) with related BE #2412.
Verified
- Resume and question-file pickers reject files over 5 MB before submit
- Inline error: "File too large, max 5 MB." (
role="alert", clears on remove/replace/reset) - Small valid PDFs still work as before
- Cap matches the server limit in #2412 (
MAX_UPLOAD_BYTES/ 5 MB) - Focused tests added for the size-limit behavior
Notes (non-blocking)
- Pair/merge with HGNRest #2412 so browser checks and server enforcement stay in sync
- After this lands, #5660 (Bug #53 – resume required/labels) should rebase onto
development— both touchJobApplicationForm.jsx
LGTM for the FE size-limit UX. Approving.
Member
|
Thank you all, merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Bug 60 (Jobs Component - Server-Side Upload Limits on Job Application Submit), frontend part: the server now refuses files over 5 MB. This shows the same limit on the application form before the applicant submits, instead of a failure after the upload.
Fixes # Bug 60 (Jobs Component - Server-Side Upload Limits on Job Application Submit)
Related PRS (if any):
This frontend PR is related to the backend PR OneCommunityGlobal/HGNRest#2412, which enforces the limits. The frontend works without it, it just shows the message early.
Main changes explained:
src/components/Collaboration/JobApplicationForm/jobApplicationQuestionUtils.js: addMAX_UPLOAD_BYTES(5 MB) andgetUploadSizeError.src/components/Collaboration/JobApplicationForm/JobApplicationForm.jsx: the resume and question file pickers refuse a file over 5 MB, clear the input and show "File too large, max 5 MB." under the field (role="alert",aria-invalid,aria-describedby). The message clears when the file is removed, replaced with a valid one, or the form is reset. It reuses the form's existing.fieldErrorstyle, so no CSS changed.src/components/Collaboration/__tests__/JobApplicationForm.uploadSizeLimit.test.jsx.How to test:
npm installandnpm run start:local/job-application, pick a role, and choose a resume larger than 5 MB: the message shows under the field and the file is not kept.npx vitest run src/components/Collaboration(11 files, 104 tests pass)Screenshots or videos of changes:
A resume over 5 MB (light, desktop): the message shows under the field and the file is not kept.
Same case in dark mode on a phone:
A small valid PDF (dark, desktop): no message, the file is kept.
Note:
npm run lint:cssreports 569 errors on this repo with and without this change; no CSS file was touched.