Skip to content

Commit

Permalink
Merge branch 'develop' into 3328-vul-audit
Browse files Browse the repository at this point in the history
  • Loading branch information
ADPennington authored Jan 17, 2025
2 parents 1ce1573 + 6d98e5f commit 442fdd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ TDP is developed to be (at minimum) compliant with Section 508 of the Rehabilita
|--|--|--|--|
| Product Owner |Lauren Frohlich |@lfrohlich |Lauren.Frohlich@acf.hhs.gov|
| Government Technical Monitor |Alex Pennington |@adpennington |Alexandra.Pennington@acf.hhs.gov|
| Vendor Product Manager |Rob Gendron |@robgendron |rgendron@teamraft.com |
| Vendor Product Manager |Lauren Hux |@lhuxraft |lhux@teamraft.com |
18 changes: 16 additions & 2 deletions tdrs-frontend/src/components/FileUpload/FileUpload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,21 @@ import { handlePreview, getTargetClassName } from './utils'
const INVALID_FILE_ERROR =
'We can’t process that file format. Please provide a plain text file.'

const INVALID_EXT_ERROR =
'Invalid extension. Accepted file types are: .txt, .ms##, .ts##, or .ts###.'
const INVALID_EXT_ERROR = (
<>
Invalid extension. Accepted file types are: .txt, .ms##, .ts##, or
.ts###.&nbsp;
<a
className="usa-link"
href="https://tdp-project-updates.app.cloud.gov/knowledge-center/file-extension-guide.html"
target="_blank"
aria-label="Need help? Read file extension guidance"
rel="noreferrer"
>
Need help?
</a>
</>
)

function FileUpload({ section, setLocalAlertState }) {
// e.g. 'Aggregate Case Data' => 'aggregate-case-data'
Expand Down Expand Up @@ -95,6 +108,7 @@ function FileUpload({ section, setLocalAlertState }) {
const dropTarget = inputRef.current.parentNode

const filereader = new FileReader()

const types = ['png', 'gif', 'jpeg']
filereader.onload = () => {
const re = /(\.txt|\.ms\d{2}|\.ts\d{2,3})$/i
Expand Down

0 comments on commit 442fdd7

Please sign in to comment.