Resolved Document upload size limit & email attachments

This commit is contained in:
Patrick Fic
2021-04-21 15:26:38 -07:00
parent 09e1ab7f83
commit e57f4b7382
5 changed files with 8 additions and 7 deletions

View File

@@ -55,7 +55,6 @@ export function DocumentsUploadComponent({
multiple={true}
fileList={fileList}
onChange={(f) => {
console.log(`f`, f);
if (f.event && f.event.percent === 100) handleDone(f.file.uid);
setFileList(f.fileList);
}}

View File

@@ -134,7 +134,7 @@ export const uploadToCloudinary = async (
type: fileType,
extension: extension,
bodyshopid: bodyshop.id,
size: file.size || cloudinaryUploadResponse.data.bytes,
size: cloudinaryUploadResponse.data.bytes || file.size,
},
],
},

View File

@@ -58,15 +58,17 @@ export default function EmailOverlayComponent({ form }) {
valuePropName="fileList"
getValueFromEvent={(e) => {
console.log("Upload event:", e);
if (Array.isArray(e)) {
return e;
}
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">
<UploadOutlined />

View File

@@ -60,7 +60,7 @@ export function EmailOverlayContainer({
const t = {
ContentType: f.type,
Filename: f.name,
Base64Content: (await toBase64(f)).split(",")[1],
Base64Content: (await toBase64(f.originFileObj)).split(",")[1],
};
attachments.push(t);
});

View File

@@ -65,7 +65,7 @@ export function JobsDocumentsGalleryReassign({ bodyshop, galleryImages }) {
});
}
};
console.log("selectedImages :>> ", selectedImages);
const handleFinish = async ({ jobid }) => {
setLoading(true);