I am generating a .xlsx
file and then place it into "../web.browser/app/cheques.xlsx"
. As I understand it is an equivalent of public folder inside the build. The problem is that I can't manage to make it available for download.
This is a fragment of code in server method, where I place a file into that place:
workbook.xlsx.writeFile("../web.browser/app/cheques.xlsx")
.then(function() {
console.log('done');
});
So should I use fs
or Picker.route
to do the job?
It's not advisable to do this. In production the build directory won't be available to you anyway.
You have a few choices:
I prefer the last one, as all your data and files are in one place.