Open avtarvikas opened 3 years ago
const exportAttendanceReport = payload => async dispatch => { try { const { data } = await axios.post( "user/attendance/report/export", { ...payload }, { responseType: "blob" } ); const pathToWrite = `${ RNFetchBlob.fs.dirs.DownloadDir }/Attendance-Report-${moment(payload.yearMonth, "YYYY-MM").format( "MMM" )}.xlsx`; RNFetchBlob.fs .writeFile(pathToWrite, RNFetchBlob.base64.encode(data), "base64") .then(() => { showMessage( "Excel File Downloaded Successfully !!", "file has been saved to download folder" ); NavigationService.goBack(); }) .catch(error => showError("Failed to read file", error)); } catch (err) { showError("Failed to download file", err); } };
"rn-fetch-blob": "^0.12.0"
File is getting downloaded but when i open it it shows [object][object]
@avtarvikas do you find any solution ?
@saurabhkanswal I left that project ;-)
"rn-fetch-blob": "^0.12.0"
File is getting downloaded but when i open it it shows [object][object]