binary content as file in pega

I have file content stored as FileData column in text format.

I want to open file when that file name is clicked to shoe the filedata content opened as File.

I followed many pega support forums and followed followin glink but it is not working.

How to show binary content as file in pega | Support Center?

I did following…

String fileDataString = tools.getParameterPage().getParameterValue(“FileData”).toString();
byte byteArray = java.util.Base64.getDecoder().decode(fileDataString);

// Get the PDF name, extension, and location from the parameter page
String fileName = tools.getParamValue(“FileName”);
String fileExt = tools.getParamValue(“FileExt”); // Unused but may be needed
String fileLoc = tools.getParamValue(“FileLoc”);

String sErrorMessage = tools.sendFile(byteArray,fileName,false,null,true);
//String sErrorMessage = tools.sendFile(byteArray, fileName, true, null, fileLoc, false, null, true);

@Priyanka Boga @RameshSangili can either of you answer this one?

@sudhaD78

Could you please let us know if you’re getting an error? Did you try to trace it to see any failures?

@sudhaD78 - Call the open url in window action instead of run activity and enable “Use page” check box in open url in window action.

Thank you.