Download a file in published REST call

0
Hi all! Back again, asking for help.   I have a REST service, which a publish for the world to use. The action is used via Javascript in the Mendix application. In the action that is called, you need to give a URL and filename which can be used to retrieve a document. The URL in turn is used a way to retrieve a filedocument. After the REST call (POST) I try to download the file immediately for the user to see.   However, the download of the file does not work. I think it has something to do with the fact that I'm not a user in the REST call. When debugging, the $CurrentUser is empty.   The name of the document is send with the URL in the REST call to this published action. I have attached the correct rights to the user that is logged in, which is the person that used the javacript REST call.  The user is also able to create and delete documents.   Is there a way to download the file that is retrieved (here ResponseBerkeleyBridge_Document) immediately?     With kind regards,   Martijn Rijneveen  
asked
2 answers
0

You might want to check out paragraph 3.3 of the documentation: https://docs.mendix.com/refguide7/published-rest-service#authentication-microflow

It seems to me that the documentation is out of date a bit because I do not see the option active session. You might want to try that one. This way a user needs to login firtst to be able to call this service and hence you would have a current user object.

Regards,

Ronald

[EDIT]

Active session are explained in 3.2/

 

 

answered
0

Are you using active session authentication?

answered