Closed mrpbennett closed 3 years ago
Any idea why i am getting undefined when downloading the file as the file name?
const downloadGPX = () => { axios({ method: 'GET', url: `https://www.strava.com/api/v3/routes/${props.data.contentfulRoutes.slug}/export_gpx`, headers: { Authorization: `Bearer ${stoken}` }, responseType: 'blob', }) .then((response) => { console.log(response.data); fileDownload((response.data, `${route.name}.gpx`)); }) .catch((err) => { console.log(err); }); };
The ${route.name}.gpx is the contents of the file
${route.name}.gpx
Any idea why i am getting undefined when downloading the file as the file name?
The
${route.name}.gpx
is the contents of the file