cordova-plugin-camera
cordova-plugin-camera copied to clipboard
(windows) Fixes apache/cordova-plugin-camera#667
Platforms affected
Windows
Motivation and Context
The plugin was leaving lots of temporary files around in the local root directory. This PR adds code to delete these temporary files.
https://github.com/apache/cordova-plugin-camera/issues/667
Description
The changes are primarily to add calls to deleteAsync() after a file is no longer needed. It cleans up the original captured picture from the camera after that file has been copied or encoded into a base64 string.
It also places the copy made during rescaling into the temporary folder location instead of the local folder.
Testing
I have tested it within my app. Four combinations of options were tested for the getPicture() API:
- FILE_URI and resize
- FILE_URI and no resize
- DATA_URI and resize
- DATA_URI and no resize.
I also monitored the files stored at the root locations of the local and temporary folder locations to confirm that none of the temporary files were left behind.
Checklist
- [ ] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [x] Commit is prefixed with
(platform)
if this change only applies to one platform (e.g.(android)
) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
- [ ] I've updated the documentation if necessary
Any chance of this PR being merged for the next release?
I think that the Travis issues were test system issues and not issues with these changes. But I'm not sure how to restart the tests.
But I'm not sure how to restart the tests.
I'll restart the tests.
It looks like the recently run tests completed successfully. It would be nice to have it merged in.
closing since windows platform has been removed