More attempts at getting datastreams working

I see what the problem is that I'm having. Line 196 in editor, the request I'm sending to flask doesn't have any data beyond the file so I get a 'Bad Request' error. I think the way to solve this is by using ajax to create the request instead of just the form action. I'm not too sure how to send files over ajax however, I did some research and couldn't come up with an answer. I'm going to search some more too see if I can find a solution.