cancel
Showing results for 
Search instead for 
Did you mean: 

Zipfilewriter - file name

aanchalrajpal
New Contributor

Does ‘content- disposition’ function works with zipfile writer.
I’m writing below exp concatenating with SFTP path but this is giving me error.
$[‘content-disposition’].match(“filename="(.*)"”)[1]

error:

Failure: $[‘content-disposition’] is undefined, Reason: ‘content-disposition’ was not found in the containing object., Resolution: Please check expression syntax and data types.

This function works well in file writer but not in zip file writer.If not can anyone suggest workaround to get file name from source and write it in .zip extension.

2 REPLIES 2

tstack
Former Employee

This looks like a potential bug in the ZipFile Writer where it is not evaluating the expression using the incoming binary document header. Right now, it can only reference pipeline parameters for the file name.

What does the rest of the pipeline/flow look like? Would you be able to use a pipeline parameter to compute the file name?

stodoroska
New Contributor III

This can be done with putting the zip file writer in a separate pipeline, and pass the content-disposition expression into a pipeline parameter that is defined in the child pipeline.content-location

But, that complicates the flow.

This is a bug in the zip file writer and the only workaround that I managed to find is with using pipeline execute like I mentioned.