We can send information about links to upload/download files at least in two different ways:
text/uri-listTo download or upload attachments to / from a shared ressource we need credentials. Question:
standalone.xml or something like this)? AttachmentDAOImpl.getFileAttachmentBinary()) and it takes very long time. For 1GB file my computer needs ca. 50 minutes.AttachmentUploadHandler:77 → this.baos = new ByteArrayOutputStream(); → This means the file will be fully loaded into the memory. Which makes working with large files impossible.
In com.seeburger.airsupply.base.exchange.MimeMessageImportHandler:
public void initializeHandlerObjects(SerializableInputStream in, MessageProperties props) { super.initializeHandlerObjects(in, props); this.mimeMessageImportProcessor = FATProcessorFactory.createMimeMessageImportProcessor(in, props, new XMLImportProviderImpl(), AttachmentProcessId.getIdBySmartiMType(props.getProperty(MessageProperties.MESSAGE_TYPE))); }
Here we can use different mimeMessageImportProcessor depending on MESSAGE_TYPE.
To insert BLOB create a new record in FAT META table at first:
INSERT INTO TFATATTACHMENTMETA (CMIMECONTENTID,CPROCESSID,CFILENAME,CORIGINATOR,CFILESIZE,CFILETYPE,CENCRYPTED,CDELETEFLAG,CCREATIONTIMESTAMP,CTRANSMISSIONTIMESTAMP,CSCANSTATUS,CSCANMODE,CLASTSCANTIMESTAMP,CWSPROCESSORNODE,CVIRUSIDS,CRETRYBLOCK,CATTACHMENTID,CREADSTATUS,CREADTIMESTAMP,CFLEXFIELD1) VALUES ('VVK_TEST_20190604',6,'attachment_1GB.txt','SUPPLIER',1048576000,'txt',0,0,1555482046306,-9223372036854775808,'STATUS_WATINGFORCHECK','ASYNC',0,NULL,NULL,0,3586,'NEW',-9223372036854775808,'COD');
After that run the small program “Main” from my test project “insertFat” (see D:\development\workspaces\insertFat).