I am using AngularJs with a REST API. I don\'t have the hand on the REST API. I can store digital object with the API by sending a REST request. I can get it also with a GET req
you can use this instead of above code :
var url = config.domain + 'file/' + file; var parameters = "Authorization=" + user.auth + "&secret-key=" + user.secretkey; var reportParameters = url + encodeURIComponent(parameters); window.location.assign(reportParameters);