cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Files as attachments in File Sender Channel

Former Member
0 Kudos

Hi All,

I am trying a scenario where i need to pick all files in a folder and zip them at once. The name of the ZIP file can be anything, but names of the files in the zip file should not change.

Example : sample_il0.csv, sample_il1.csv, sample_il2.csv, sample_il3.csv.

now the Zipped file can be any thing. Like completezip.zip. But in the completedzip.zip should have these sample_il0.csv, sample_il1.csv, sample_il2.csv, sample_il3.csv files.

The condition is the names of the files should not be changed in the Zipped file. Zipped file name can be anything. This is much like selecting all files at once and right click and zip them at once on windows.

For this i am using additional files option in sender file adapter and payloadzip bean.

It is creating resultant completezip.zip file and this zip file has 4 files namely MainDocument, sample_il1.csv, sample_il2.csv, sample_il3.csv.

Everything is good except MainDocument . Here i am expecting sample_il0.csv file.

<SOAP:Body>

- <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink">

- <sap:Payload xlink:type="simple" xlink:href="cid:payload-d33190d134c811e1b0861606dd288802sap.com">

<sap:Name>MainDocument.zip</sap:Name>

<sap:Description />

<sap:Type>Application</sap:Type>

</sap:Payload>

- <sap:Payload xlink:type="simple" xlink:href="cid:payload-d33190d234c811e1cb7a1606dd288802sap.com">

<sap:Name>sample_il1.csv</sap:Name>

<sap:Description />

<sap:Type>ApplicationAttachment</sap:Type>

</sap:Payload>

- <sap:Payload xlink:type="simple" xlink:href="cid:payload-d331b7e034c811e1c7dc1606dd288802sap.com">

<sap:Name>sample_il2.csv</sap:Name>

<sap:Description />

<sap:Type>ApplicationAttachment</sap:Type>

</sap:Payload>

- <sap:Payload xlink:type="simple" xlink:href="cid:payload-d331b7e134c811e192371606dd288802sap.com">

<sap:Name>sample_il3.csv</sap:Name>

<sap:Description />

<sap:Type>ApplicationAttachment</sap:Type>

</sap:Payload>

</sap:Manifest>

</SOAP:Body>

Here my question is how to change MainDocument.zip to sample_il0.csv as shown in the below.

<sap:Name>MainDocument.zip</sap:Name>

<sap:Description />

<sap:Type>Application</sap:Type>

If i am able to bring above as below, then i think, everything will work fine.

<sap:Name>sample_il0.csv</sap:Name>

<sap:Description />

<sap:Type>Application</sap:Type>

How to change the obligatory name of main payload ?

Best Regards,

Subbu

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

I somehow think you have complicated the scenario with modules and additional files. You could have zipped the file at sender using some script and then made a simple file transfer.

For your question, I don't think you can change the name of MainDocument. It is the name of the first picked file which seems to be converted into MainDocument.

Regards,

Prateek Raj Srivastava