That workspace works fine in FME Desktop and as a Job Submitter service on FME Server. If I publish the workspace as Data Download service it fails with the error message: "The filename, directory name, or volume label syntax is incorrect" and also returning the source code of the Python parameter. It looks like the Python source code is used as a file path rather than running the script and using its result.
I changed the script to only return a filename instead of the full path, but I still get the same error message. If I enter a hardcoded file name into the writer destination parameter (instead of the Python script) everything works fine and the file name is used in the downloadable zip file.
Is there a way to set the file name inside the zip archive dynamically and how?