orthes/medium-editor-insert-plugin — pull request #12 by miloshadzic (2013-12-16 17:14:29+00:00)
Title: Make it possible to format the data that's sent.

Re: issue #11

I realized that I didn't really need to rewrite the whole upload function and just needed to format the data that gets sent to the server. This patch makes it possible to do just that like this:

```javascript

$('.something').mediumInsert({
images: true,
imagesPlugin: {
formatData: function (file) {
var formData = FormData();
formData.append('attachment[file]', file);
// add more stuff
return formData;
}
}
```

No other behaviour changes afaik.

Please review.