I am creating a form on an html page and I am having trouble posting a picture to a SharePoint document folder, the method that I am using works perfect in Google Chrome on desktop and successfully posts to the SharePoint folder but doesn't want to work on AirWatch browser on an iPad for some reason and I can't find any good documentation on Airwatch. I am using SharePointPlus javascript library to push the image to SharePoint. The image is successfully converted to base64 and I can print the base64 string into a textbox on the html page.

When I am on the iPad/Airwatch, i choose the picture, and the base64 string is pasted into a textbox, then I click the Send Data button and I don't receive the after:function alert I have set and the picture doesn't post to SharePoint. The SharePointPlus documentation is pretty sparse as well.

Here is my SharePointPlus createFile function in javascript that is triggered when I click submit:

var fileName; function changeHandler(inputElement){ var fileReader, file; fileReader=new FileReader(); var fileList=inputElement.files; file=fileList[0]; // console.log(file.name); fileName = file.name; fileReader.onload=load_handler; fileReader.readAsDataURL(file); } function load_handler(event){ var url=event.target.result; // removes data:image/jpeg:base64 from beginning of base64 url = url.substring(url.indexOf(',')+1); // console.log(url); fileInBase64 = url; document.getElementById("log").value=fileInBase64; }//end function load_handler $("#submit_pic").click(function(){ //fileName is the base64 encoded image string myImage = fileInBase64; $SP().createFile({ content:myImage, encoded:true, destination:"http://example.com/folder/Code/myfile.jpg", url:"/folder", after:function(){alert('done');} }); });

Edit: Now I think it has something to do with the base64 string on the iPad, after inspecting the string and trying to convert it back to an image via a website it doesn't work right... here is all the code that grabs the file, converts to base64, and tries to submit it.

If I alert myImage, I get a very large alert box that is spanning the height of the iPad with no text in it. So it looks like there is something there, but not really. If i alert a hardcoded string it looks fine.

Technologies used: SharePoint 2010 Jquery SPServices SharePointPlus AirWatch browser w/Ipad Chrome on Desktop