on 07-07-2008 8:35 PM
Hi,
We have a custom module that will create multiple attachments. The result is then passed to the PayloadZipBean, which zips as per required.
When we output this to a file adapter, we provide the file name as say "zippedfile.zip" the result is as expected.
For example, if the custom module created 3 attachments with the names as file1.txt, file2.txt and file3.txt, the zip file zippedfile.zip, will contain 3 files as file1.txt, file2.txt and file3.txt.
The issue that we are facing is when we use the mail adapter, the zip file is getting renamed to file1.txt.zip i.e to say that it takes the name of the main payload from the custom module (file1.txt)
TextPayload txtpayload = message.getDocument();
txtpayload.setContentType("text/plain");
txtpayload.setName("file1.txt");
moduleData.setPrincipalData(message);
We tried using the MessageTransformbean but it doesn't seem to change the name of the file.
Not sure where we are going wrong. Is it that the output of the payloadzipbean cannot be used and altered by MessageTransformbean?
Is there any alternative as to rename the name of zipfiles and use it in the mail adapter?
Appreciate any help on this regard.
Regards,
Shabz
Solved.
use Transform.ContentDisposition - attachment;filename="youfilename"
Do read the mail adapter FAQ.
The parameter can vary for different mail client.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.