使用javascript库将额外参数发送到服务器以上载文件

Hi I've searched in bower packages with upload keyword: http://bower.io/search/?q=upload

I found these interesting dropzone, fine-uploader, Resumable.js, flow.js, ng-flow But I've noticed that this kind of libraries only post the file, I have not found a callback or method to post additional info with the file, like this

{"categoryid":"1", "metadata":"metadata of the file"}

is there a way to do that with these libraries?, how to get the metadata at server side?. I'm working with laravel making the rest api and angularjs making the client.

This is a powerful file upload package for Angular. Check it out here. It can do exactly what you are looking to do and more.

in front end:

var r = new Resumable({
    target: 'serverfile.php',
    query:{'addtional_info':'your_value'}
});

in back end: (php)

<?php
$my_addtional_val = $_POST['addtional_info'];
 ...
?>