How to get binary Filename from postman in Linx


I want to retrieve the file name with extension in Linx from postman binary fileupload option.

Hi Leemarose,

Welcome to Linx Community!

With regards to your question, we would need to ask a bit more info. The reason is, when you send a file via Postman, I assume you selected “POST”, “Body”, “Binary” and “Select File”, Postman will grab the contents of the file to put it into the POST REQUEST.

Now if you click on the little Code button on the right top of your screen, looking like this “</>” you will see the actual call Postman would make. For example, if I want to call a service called “/service/file”, the Postman contents will look like this:

Host: localhost:8080
Content-Type: application/octet-stream
Content-Length: 22

"<file contents here>"

As you can see, there is no filename or extension in this code. Postman does not send this info from just “Select file”. So you need to set up your service to also ask for the filename. You can do this either by adding a parameter to your PATH, so instead of “/service/file” you would call “/service/file/myfile.txt” or you can add a Query parameter to your service. Then you would call “/service/file?Filename=myfile.txt”

In both cases, in Linx you would then be able to access the filename in the $.Parameters

So my question is, how did define your service in Linx?