Skip to content

Commit

Permalink
Merge pull request #2163 from City-of-Helsinki/hl-829
Browse files Browse the repository at this point in the history
HL-829 | Add more mime types as allowed uploads
  • Loading branch information
JanneJuhola authored Aug 2, 2023
2 parents 7b67120 + 87a9c66 commit 8fa21be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import {
$Grid,
$GridCell,
} from 'shared/components/forms/section/FormSection.sc';
import { ATTACHMENT_MAX_SIZE } from 'shared/constants/attachment-constants';
import {
ATTACHMENT_CONTENT_TYPES,
ATTACHMENT_MAX_SIZE,
} from 'shared/constants/attachment-constants';
import { useTheme } from 'styled-components';

import { $ActionsWrapper } from '../../ApplicationReview.sc';
Expand Down Expand Up @@ -39,7 +42,7 @@ const ConsentActions: React.FC<UploadProps> = ({
onUpload={handleUpload}
isUploading={isUploading}
attachmentType={ATTACHMENT_TYPES.EMPLOYEE_CONSENT}
allowedFileTypes={['application/pdf']}
allowedFileTypes={ATTACHMENT_CONTENT_TYPES}
maxSize={ATTACHMENT_MAX_SIZE}
uploadText={t(`${translationsBase}.addAttachment`)}
loadingText={t(`common:upload.isUploading`)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import {
$Grid,
$GridCell,
} from 'shared/components/forms/section/FormSection.sc';
import { ATTACHMENT_MAX_SIZE } from 'shared/constants/attachment-constants';
import {
ATTACHMENT_CONTENT_TYPES,
ATTACHMENT_MAX_SIZE,
} from 'shared/constants/attachment-constants';
import { useTheme } from 'styled-components';

import { $ActionsWrapper } from '../../ApplicationReview.sc';
Expand Down Expand Up @@ -49,7 +52,7 @@ const EmployeeActions: React.FC<UploadProps> = ({
onUpload={handleUpload}
isUploading={isUploading}
attachmentType={ATTACHMENT_TYPES.HELSINKI_BENEFIT_VOUCHER}
allowedFileTypes={['application/pdf']}
allowedFileTypes={ATTACHMENT_CONTENT_TYPES}
maxSize={ATTACHMENT_MAX_SIZE}
uploadText={t(`${translationsBase}.addAttachment`)}
loadingText={t(`common:upload.isUploading`)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import {
$Grid,
$GridCell,
} from 'shared/components/forms/section/FormSection.sc';
import { ATTACHMENT_MAX_SIZE } from 'shared/constants/attachment-constants';
import {
ATTACHMENT_CONTENT_TYPES,
ATTACHMENT_MAX_SIZE,
} from 'shared/constants/attachment-constants';
import { useTheme } from 'styled-components';

import { $ActionsWrapper } from '../../ApplicationReview.sc';
Expand Down Expand Up @@ -39,7 +42,7 @@ const EmploymentActions: React.FC<UploadProps> = ({
onUpload={handleUpload}
isUploading={isUploading}
attachmentType={ATTACHMENT_TYPES.EMPLOYMENT_CONTRACT}
allowedFileTypes={['application/pdf']}
allowedFileTypes={ATTACHMENT_CONTENT_TYPES}
maxSize={ATTACHMENT_MAX_SIZE}
uploadText={t(`${translationsBase}.addAttachment`)}
loadingText={t(`common:upload.isUploading`)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {
$Grid,
$GridCell,
} from 'shared/components/forms/section/FormSection.sc';
import { ATTACHMENT_MAX_SIZE } from 'shared/constants/attachment-constants';
import {
ATTACHMENT_CONTENT_TYPES,
ATTACHMENT_MAX_SIZE,
} from 'shared/constants/attachment-constants';
import { useTheme } from 'styled-components';

import { $ActionsWrapper } from '../../ApplicationReview.sc';
Expand Down Expand Up @@ -42,7 +45,7 @@ const PaySubsidyActions: React.FC<UploadProps> = ({
onUpload={handleUpload}
isUploading={isUploading}
attachmentType={ATTACHMENT_TYPES.PAY_SUBSIDY_CONTRACT}
allowedFileTypes={['application/pdf']}
allowedFileTypes={ATTACHMENT_CONTENT_TYPES}
maxSize={ATTACHMENT_MAX_SIZE}
uploadText={t(`${translationsBase}.addAttachment`)}
loadingText={t(`common:upload.isUploading`)}
Expand Down

0 comments on commit 8fa21be

Please sign in to comment.