Resolved Document upload size limit & email attachments
This commit is contained in:
@@ -55,7 +55,6 @@ export function DocumentsUploadComponent({
|
|||||||
multiple={true}
|
multiple={true}
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
onChange={(f) => {
|
onChange={(f) => {
|
||||||
console.log(`f`, f);
|
|
||||||
if (f.event && f.event.percent === 100) handleDone(f.file.uid);
|
if (f.event && f.event.percent === 100) handleDone(f.file.uid);
|
||||||
setFileList(f.fileList);
|
setFileList(f.fileList);
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export const uploadToCloudinary = async (
|
|||||||
type: fileType,
|
type: fileType,
|
||||||
extension: extension,
|
extension: extension,
|
||||||
bodyshopid: bodyshop.id,
|
bodyshopid: bodyshop.id,
|
||||||
size: file.size || cloudinaryUploadResponse.data.bytes,
|
size: cloudinaryUploadResponse.data.bytes || file.size,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,15 +58,17 @@ export default function EmailOverlayComponent({ form }) {
|
|||||||
valuePropName="fileList"
|
valuePropName="fileList"
|
||||||
getValueFromEvent={(e) => {
|
getValueFromEvent={(e) => {
|
||||||
console.log("Upload event:", e);
|
console.log("Upload event:", e);
|
||||||
|
|
||||||
if (Array.isArray(e)) {
|
if (Array.isArray(e)) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
return e && e.fileList;
|
return e && e.fileList;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Upload.Dragger multiple listType="picture-card">
|
<Upload.Dragger
|
||||||
|
beforeUpload={Upload.LIST_IGNORE}
|
||||||
|
multiple
|
||||||
|
listType="picture-card"
|
||||||
|
>
|
||||||
<>
|
<>
|
||||||
<p className="ant-upload-drag-icon">
|
<p className="ant-upload-drag-icon">
|
||||||
<UploadOutlined />
|
<UploadOutlined />
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export function EmailOverlayContainer({
|
|||||||
const t = {
|
const t = {
|
||||||
ContentType: f.type,
|
ContentType: f.type,
|
||||||
Filename: f.name,
|
Filename: f.name,
|
||||||
Base64Content: (await toBase64(f)).split(",")[1],
|
Base64Content: (await toBase64(f.originFileObj)).split(",")[1],
|
||||||
};
|
};
|
||||||
attachments.push(t);
|
attachments.push(t);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export function JobsDocumentsGalleryReassign({ bodyshop, galleryImages }) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log("selectedImages :>> ", selectedImages);
|
|
||||||
const handleFinish = async ({ jobid }) => {
|
const handleFinish = async ({ jobid }) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user