How to Rotate an Image using JavaScript

var data = new FormData();
data.append("imageFile", fileInput.files[0], "file");

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
});"POST", "");xhr.setRequestHeader("Apikey", "YOUR-API-KEY-HERE");xhr.send(data);
bower install jquery
var form = new FormData();
form.append("imageFile", fileInput.files[0], "file");
var settings = {
"url": "<double>/angle",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "multipart/form-data",
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
$.ajax(settings).done(function (response) {



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.