Posted by David Standing 1 on 30/10/2017 22:00:58:
Could you not take the photo at 90 degrees to what you want it to upload at? 
If only it were that easy!
Quite a good description of what causes the problem here if you want details. Suffice it to say that the article concludes 'To sum everything up: The Exif Orientation Tag is a mess and the world would be a better place without it. There are so many ways where subtle brokenness of one piece of software can screw up everything that it’s just not funny anymore.'
As Neil says the best solution is to use image editing software to nail the picture's orientation manually. Basically, you look at the picture, use the image editor to turn the picture until it looks the right way up, and save it. That overrides the ambiguous orientation guessed by the camera with your simple sensible view..
Gimp and Photoshop both do the job but are a steep learning curve for casual users. I believe most of the simpler photo editors also work. Unfortunately I can't recommend any because I don't use them! Perhaps someone else can help?
Dave