feat: implement checksum-based duplicate detection for split email attachments
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
This commit is contained in:
1 parent
b47ad17568
commit
44d5206e07
4 files changed
+84
-29
No files matched your search
@@ -57,6 +57,11 @@ export const emailImportApi = {
|
||||
return res.data;
|
||||
},
|
||||
|
||||
checkSplitChecksum: async (attachmentId: number, pages: { start: number; end: number }): Promise<boolean> => {
|
||||
const res = await api.post<{ isDuplicate: boolean }>(`/api/email-import/attachments/${attachmentId}/check-split-checksum`, { pages });
|
||||
return res.data.isDuplicate;
|
||||
},
|
||||
|
||||
executeImport: async (emailDate: string, attachments: AttachmentImportData[]): Promise<{ success: boolean; results: any[] }> => {
|
||||
const res = await api.post('/api/email-import/execute', { emailDate, attachments });
|
||||
return res.data;
|
||||
|
||||
Reference in new issue
Block a user