mardi 24 janvier 2017

How to initiate file download in Ember using memberAction

I'm trying to initiate a file download and the GET requests seems to be working and the file is being transferred somewhere, I just don't know where. The link goes to localhost/api/change-set/change-set/385/document/3/

What's happening here, why isn't it starting a download in my browser? This is the code I have in my model

  download: memberAction({
    path: 'document/3/',
    type: 'get'
  }),

  runDownload() {
    const changeSetIdCheck = generateIdCheck(get(this, 'id'));
    return this.download();
  }

And this is my downloadChangeSet action which initiates when the download button is pressed

downloadChangeSet() {
  var changeSet = get(this, 'changeSet');
  get(this,'changeSet').runDownload();

}




Aucun commentaire:

Enregistrer un commentaire