Reputation: 1494
I need to send parameters to a REST service called from AngularJs. I need to send some data besides the file, how can I send it, and how can I specify the file parameter?
Regards,
Upvotes: 1
Views: 2061
Reputation: 19890
Either via the request.params
option:
request: {
params: {
param1: "foo",
param2: "bar"
}
}
or via the setParams
method:
uploader.setParams({param1: "foo", param2: "bar"});
You can adjust the name of the file parameter via the request.inputName
option.
All of this is documented. Please see the documentation for additional information and supported workflows related to setting parameters.
Upvotes: 3