0

I've read a few examples about how to upload a file to a sharepoint 2013 document library without submitting the form itself. This question is a result of my research (I wont tag it as sharepoint specific as the part what I'm asking about has nothing really to do with sharepoint itself).

In all examples which I found about file uploads without using form-submit I saw that FileReader is being used. Now from what I've read this is only possible with IE 10+. As one of my core jobs is to make sure that the program is IE 9 compatible, I'm running into a problem now.

As an example for one of the methods I found: http://blogs.msdn.com/b/uksharepoint/archive/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques.aspx

In there the file is uploaded with the help of the FileReader (which gets the file content), then the file is transformed into a format that the sharepoint webservices can read and then uploaded.

So as stated my problem is that I need to be IE 9 compatible: Is there an alternative to using FileReader for uploading a file without submitting the form itself? (especially as I need to get the contents of the file, modify them and then use them to fill the data of a webservice)

Thomas
  • 2,886
  • 3
  • 34
  • 78
  • You are probably looking for [JQuery.post](http://api.jquery.com/jquery.post/). Like in this [question](http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery). – Antarr Byrd Dec 10 '14 at 15:57
  • From what I gather it uses FormData ? Can I use that without problems with IE 9? (if so then yepp sounds like it is in the right direction) – Thomas Dec 10 '14 at 16:29
  • You will just have to try it and see. From my experience it should work. I only have problem with IE8. – Antarr Byrd Dec 10 '14 at 17:09
  • :/ looked through the whole solution there. nope won't work. As only the iframe option works on IE 9 and there it needs a submit of the form to work :/ – Thomas Dec 11 '14 at 05:38

0 Answers0