Try and use the handlers provided with the plugin and bind the submit() to your upload button in the 'add' hander. Something like this might be more effective:
<div class="fileupload fileupload-new" data-provides="fileupload">
<span class="btn-small btn-file">
<span class="fileupload-new">Choose an image</span>
<input type="file" id="fileupload" name="media[]" data-url="upload.php" multiple/>
</span>
<span class="fileupload-preview small clearfix"></span>
<a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a>
</div>
<button style="display: inline-block;" class="btn smaller" id="media-upload-btn">Upload</button>
$('#fileupload').fileupload({
maxFileSize: 100000000,
acceptFileTypes: '/^image\/(gif|jpeg|png)$/',
previewSourceFileTypes: '/^image\/(gif|jpeg|png)$/',
add: function (e, data) {
data.context = null;
data.context = $('#media-upload-btn').click(function (e) {
e.preventDefault();
data.submit();
});
},
done: function (e, data) {
if(data && data.result) {
data.fileInput.context = [];
// do something with your result here
}
});