I'm trying to add an attachment to an issue from node with "apollo-datasource-rest".
async addIssueAttachment(file) {
// file = {createReadStream, filename, size, mimetype, ... }
await this.post("rest/api/3/issue/{issue}/attachments", {}, {
headers: {
"Authorization": "Basic {key},"
"Content-Type": "multipart/form-data",
"X-Atlassian-Token": "no-check",
"Accept": "*/*"
},
file
});
return true;
}currently getting this error:
ApolloError: 415: Unsupported Media Type
How do I send the file?
Should I use something other than "apollo-datasource-rest"?