Could not able to view a document once pulled it from a rest call when used universal file viewer

0
Hello Team Greetings, I am able to push the file uploaded in Mendix UI and able to pull the same file to and from a network drive using a rest call. But unable to view a .pdf file when an email is converted to a pdf via html and is available as in form of .pdf file in network drive. I’m able to pull the file but when viewed giving the below error. And when downloaded the same file and tried opening it through adobe reader it gave me this reason for not able to open the file. But the same file if opened when tried opening from the network instead pulling from mendix. this is mendix microflow screenshot Thanks and Regards  MohammadSalauddin
asked
2 answers
0

Hi MohammadSalauddin,

 

I don’t get your question exactly, but I think you are asking why you can’t view the file you are retrieving using an REST GET API call.

 

If writing the file to a folder is  an REST POST command and you need to Base64Encode the binary to ASCII, I assume that retrieving the file is an REST GET command. The product of that call will be again a ASCII string that you need to convert into a binary using Base64Decode.

 

If you give me the link to the REST API I can even be more specific, but I hope this helps you already.

 

Go Make It

answered
0

Hi MohammadSalauddin,

 

I don’t get your question exactly, but I think you are asking why you can’t view the file you are retrieving using an REST GET API call.

 

If writing the file to a folder is  an REST POST command and you need to Base64Encode the binary to ASCII, I assume that retrieving the file is an REST GET command. The product of that call will be again a ASCII string that you need to convert into a binary using Base64Decode.

 

If you give me the link to the REST API I can even be more specific, but I hope this helps you already.

 

Go Make It

answered