I'm not sure how to retrieve filename in your case but below you can find a 
working sample of how to set the filename of attachment from flowscript:

        function downloadZIP(viewData) {
                //we have to change the filename of attachment
                var response = cocoon.response;         
                response.setHeader(
                    "Content-Disposition",
                    "attachment; filename=" + viewData.id + ".zip"
                );              
                
                cocoon.sendPage(
                        "eps/" + viewData.id + ".zip", 
                        {
                            "data": viewData
                        }
                );      
        }

Kind regards,
Robby
-----Oorspronkelijk bericht-----
Van: Matthias Müller [mailto:[email protected]]
Verzonden: ma 18-4-2011 14:46
Aan: [email protected]
Onderwerp: [C2.2] Original name of uploaded file
 
Hi there,

in my cocoon app i have a simple transformation xml -> fo -> pdf. The resulting 
pdf needs to be named as the uploaded xml file + .pdf extension.
How can I achieve that? Is there a way to access the data of the uploaded file 
in the sitemap.xmap / flow.js?

Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


<<winmail.dat>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to