Skip to content

Commit

Permalink
feat(credential upload): add maxfilesize
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw committed Aug 28, 2023
1 parent d391c9f commit 541160a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@
"editUsecase": {
"title": "Trigger the use case participation by signing and uploading the use case frame agreement for {{usecaseName}}",
"description": "To be able to participate in the data exchange of the use case {{usecaseName}} please download the use case frame agreement {placeholder until download is available} and upload the signed document in the upload window below.After submission, the platform owner will validate the uploaded document you will be informed as soon as the validation is successfully finished",
"fileSizeError": "Please upload only pdf file upto 2 MB.",
"checkboxLabel": "Yes, I confirm that I have uploaded the signed use case frameagreement",
"error": "Something went wrong!",
"success": "Usecase document upload has been done successfully."
Expand Down Expand Up @@ -1593,7 +1594,7 @@
"selectLabel": "Type of certificate",
"placeholder": "Please select",
"uploadDocumentTitle": "Please upload your certificate proof:",
"note": "Please upload only pdf files with maximum 1 MB.",
"note": "Please upload only pdf files with maximum 2 MB.",
"descriptionLabel": "Description for verification",
"error": "Something went wrong. ",
"success": "Certificate uploaded successfully."
Expand Down
3 changes: 2 additions & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,7 @@
"editUsecase": {
"title": "Trigger the use case participation by signing and uploading the use case frame agreement for {{usecaseName}}",
"description": "To be able to participate in the data exchange of the use case {{usecaseName}} please download the use case frame agreement {placeholder until download is available} and upload the signed document in the upload window below.After submission, the platform owner will validate the uploaded document you will be informed as soon as the validation is successfully finished",
"fileSizeError": "Please upload only pdf file upto 2 MB.",
"checkboxLabel": "Yes, I confirm that I have uploaded the signed use case frameagreement",
"error": "Something went wrong!",
"success": "Usecase document upload has been done successfully."
Expand Down Expand Up @@ -1532,7 +1533,7 @@
"selectLabel": "Type of certificate",
"placeholder": "Please select",
"uploadDocumentTitle": "Please upload your certificate proof:",
"note": "Please upload only pdf files with maximum 1 MB.",
"note": "Please upload only pdf files with maximum 2 MB.",
"descriptionLabel": "Description for verification",
"error": "Something went wrong. ",
"success": "Certificate uploaded successfully."
Expand Down
5 changes: 4 additions & 1 deletion src/components/overlays/EditUsecase/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ export default function EditUsecase({
<Dropzone
acceptFormat={{ 'application/pdf': [] }}
maxFilesToUpload={1}
maxFileSize={2097152}
onChange={([file]) => {
setUploadedFile(file)
}}
errorText={'helperText'}
errorText={t(
'content.usecaseParticipation.editUsecase.fileSizeError'
)}
DropStatusHeader={false}
DropArea={renderDropArea}
/>
Expand Down
5 changes: 4 additions & 1 deletion src/components/overlays/UpdateCertificate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ export default function UpdateCertificate({ id }: { id: string }) {
<Dropzone
acceptFormat={{ 'application/pdf': [] }}
maxFilesToUpload={1}
maxFileSize={2097152}
onChange={([file]) => {
setUploadedFile(file)
}}
errorText={'helperText'}
errorText={t(
'content.usecaseParticipation.editUsecase.fileSizeError'
)}
DropStatusHeader={false}
DropArea={renderDropArea}
/>
Expand Down

0 comments on commit 541160a

Please sign in to comment.