Image getting rotated automatically on upload

前端 未结 3 1687
面向向阳花
面向向阳花 2020-12-09 18:32

I\'m trying to upload a base64 encoded image and save after decoding it. Image is getting uploaded and saved, and I can access it using a URL and everything..but the image g

3条回答
  •  暖寄归人
    2020-12-09 19:06

    I experienced this issue when making an mobile hybrid application that used Cordova to access an mobile phones camera and then post the image to the server. I resolved it by setting the correctOrientation property to true.

    navigator.camera.getPicture(onSuccess, onFail,
                            {
                                quality: 80,
                                destinationType:Camera.DestinationType.DATA_URL,
                                correctOrientation : true
                            });
    

提交回复
热议问题