There is unfortunately no way of modifying the orientation of the photo file other other than to load the image, rotate it manually and re-save it in it's correct orientation.
See this question for some details on how to save the image once it's rotated: Android Rotate Picture before saving
Edit: Ok, so what you'll want to do is in your onActivityResult() method, load the image and rotate it as you already do. After rotating it, you should have a correctly orientated Bitmap object, then all you need to do is either overwrite your existing photo, or create a new file like this:
try {
FileOutputStream out = new FileOutputStream(filename);
bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);
out.close();
} catch (Exception e) {
e.printStackTrace();
}
Also worth noting, is that if you decide to create a new file, be sure to delete it after your upload is complete otherwise you'll be unnecessarily filling up the user's internal storage.