I prefer to modify inside of gallery.js. The ImageEditor doesn't need to guarantee it always returns a File. I change the callback function of  ImageEditor.getCroppedRegionBlob in "cropAndEndPick".