File upload file type exclusions and language variations
This commit is contained in:
@@ -1290,6 +1290,7 @@ const rejectStyle = {
|
||||
const RenderFileUpload = (field) => {
|
||||
const files = field.input.value;
|
||||
let { t } = useTranslation();
|
||||
|
||||
const style = useMemo(
|
||||
() => ({
|
||||
...baseStyle,
|
||||
@@ -1478,10 +1479,7 @@ const RenderFileUpload = (field) => {
|
||||
return (
|
||||
<>
|
||||
<Dropzone
|
||||
// onDrop={(filesToUpload, e) =>
|
||||
// field.input.onChange(filesToUpload)
|
||||
// }
|
||||
|
||||
accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/tiff,image/jpeg,application/zip"
|
||||
onDrop={(filesToUpload, e) => {
|
||||
const renamedAcceptedFiles = filesToUpload.map(
|
||||
(file) =>
|
||||
@@ -1508,7 +1506,18 @@ const RenderFileUpload = (field) => {
|
||||
<div {...getRootProps({ style })}>
|
||||
{" "}
|
||||
<input id={field.id} {...getInputProps()} />
|
||||
<div>Drag and drop your files here.</div>
|
||||
<div>
|
||||
{t(
|
||||
"newappeal:new-appeal-fileupload-drop-label"
|
||||
)}
|
||||
</div>
|
||||
<em>
|
||||
(
|
||||
{t(
|
||||
"newappeal:new-appeal-fileupload-file-list-label"
|
||||
)}
|
||||
)
|
||||
</em>
|
||||
</div>
|
||||
<aside>{thumbs}</aside>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user