fix pdf generated on complete of appeal and set file limit to 500mb
This commit is contained in:
@@ -2000,7 +2000,7 @@ const RenderFileUpload = (field) => {
|
|||||||
<>
|
<>
|
||||||
<Dropzone
|
<Dropzone
|
||||||
key={field.input.name + "_key"}
|
key={field.input.name + "_key"}
|
||||||
maxSize={210 * 1024 * 1024}
|
maxSize={500 * 1024 * 1024}
|
||||||
accept={{
|
accept={{
|
||||||
"application/pdf": [".pdf"],
|
"application/pdf": [".pdf"],
|
||||||
"application/msword": [".doc"],
|
"application/msword": [".doc"],
|
||||||
@@ -2100,12 +2100,13 @@ const RenderFileUpload = (field) => {
|
|||||||
<div {...getRootProps({ style })}>
|
<div {...getRootProps({ style })}>
|
||||||
{" "}
|
{" "}
|
||||||
<input id={field.id} {...getInputProps()} />
|
<input id={field.id} {...getInputProps()} />
|
||||||
<div>
|
<div className="govuk-!-font-size-14">
|
||||||
{t(
|
{t(
|
||||||
"newappeal:new-appeal-fileupload-drop-label"
|
"newappeal:new-appeal-fileupload-drop-label"
|
||||||
)}
|
)}{" "}
|
||||||
|
(Max 500MB)
|
||||||
</div>
|
</div>
|
||||||
<em>
|
<em className="govuk-!-font-size-14">
|
||||||
(
|
(
|
||||||
{t(
|
{t(
|
||||||
"newappeal:new-appeal-fileupload-file-list-label"
|
"newappeal:new-appeal-fileupload-file-list-label"
|
||||||
|
|||||||
@@ -158,19 +158,13 @@ export default async function handler(req, res) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
let newFileListArr = [];
|
const uniqueArray = appealBodyObj.filesList.filter((obj, index, self) => {
|
||||||
appealBodyObj.filesList.hasOwnProperty("value")
|
// Check if the name has already been encountered
|
||||||
? (newFileListArr = blobProgress.filesList.concat(
|
return index === self.findIndex((t) => t.name === obj.name);
|
||||||
appealBodyObj.filesList.value[0]
|
});
|
||||||
))
|
|
||||||
: (newFileListArr = blobProgress.filesList);
|
|
||||||
|
|
||||||
newFileListArr = newFileListArr.filter(
|
|
||||||
(value) => Object.keys(value).length !== 0
|
|
||||||
);
|
|
||||||
|
|
||||||
Object.assign(blobProgress, {
|
Object.assign(blobProgress, {
|
||||||
"filesList": newFileListArr,
|
"filesList": uniqueArray,
|
||||||
"caseObj": tempCaseBlob,
|
"caseObj": tempCaseBlob,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user