Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(credential upload): add maxfilesize #241

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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