I am currently utilizing the Angular-file-upload library to upload files to an API. This is how I'm approaching it:
var uploadFile = function (file) {
return $upload.upload({
url: '/api/place/logo',
data: {place_id: 1, token: <some_token>},
file: file
});
};
All the parameters appear to be properly configured. The API requires the inclusion of a token
for authentication purposes. However, despite setting the necessary data, the API consistently returns a BadRequest
error and does not seem to receive the token
or the place_id
sent by the client.
What could potentially be causing this issue?