7656 fix phonegap app crashing

Refactored file handling to handle the app returning file URI when capturing photos.
use ["delete"]