boedy opened a new issue, #330: URL: https://github.com/apache/cordova-plugin-file-transfer/issues/330
I believe https://github.com/apache/cordova-plugin-file-transfer/pull/310 broke the previous behaviour. It was possible to provide a nested path as target file. Now it will throw an error when doing so. ## Code to reproduce ``` (() => { const fileTransfer = new FileTransfer(); const url = 'http://cordova.apache.org/static/img/cordova_bot.png' const filePath = 'cdv'+window.cordova.file.dataDirectory + 'nested/test.png'; fileTransfer.download( url, filePath, file => console.log(file), error => console.error(error) ); })() ``` ## Possible fix Adding this code snippet after [line 727](https://github.com/kpatfln/cordova-plugin-file-transfer/blob/2cdb0403a81821e144998c8d9a00d338d6ece3ee/src/android/FileTransfer.java#L727) ``` if(file == null){ file = new File(targetUri.getPath()); file.mkdirs(); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org