1

I have created an application in Mule 3.9 which coverts Json to Excel. I need to deploy it on server,so that it can be used by a larger audience. The code uses HTTP Connector-->Transformer-->File Connector. I need the application to work in such a way that when the application is deployed on Pivotal Cloud Foundry (PCF), anyone who sends request to this application via postman, will have the excel file downloaded to their local machine.

How can I achieve this?

PS: Since everyone will not be having access to login to the server and access the file, somehow getting the Excel sheet on the requesters local machine is the only way I can think of. Any other suggestions are welcome.

  • Request: JSON Request sent on Postman
  • Response: Converted Excel Sheet
aled
  • 21,330
  • 3
  • 27
  • 34

1 Answers1

1

Probably there is no way the File connector can reach out the client local machine, so I would rule that out. The File connector will have access to the file system of the server in which it is deployed.

The usual way to do this is to set the file, in this case the Excel payload resulting of the Transformer, at the end of the flow so it is returned to Postman as the body of the HTTP response. You might need to set the right content type. Postman should be able to handle a binary response. No file handling involved.

aled
  • 21,330
  • 3
  • 27
  • 34