Reputation: 63
I'm using the jquery-file-upload how describes http://css.dzone.com/articles/angularjs-file-upload but aditionally I need to send a parameter via query string, so I need to change that parameter according to a select option change, which value is in $scope.
So how can I to achieve this? thanks in advance.
Upvotes: 1
Views: 3662
Reputation: 22116
HTML (same as here: https://stackoverflow.com/a/18580266/750216):
file-upload='uploadOptions'
JS:
$scope.uploadOptions = {
url: yourDynamicUrl
}
Upvotes: 0
Reputation: 31
@srigi
Adding following codes to AngularJS controller:
$scope.$on('fileuploadadd', function(e, data) {
data.url = '/attachfile?param=test';
});
Upvotes: 3
Reputation: 63
I found a solution using the 'data' parameter in a event of the jquery file upload, in https://github.com/blueimp/jQuery-File-Upload/issues/355
Upvotes: 0