I'm using NodeJS to try to POST a file as an attachment to the /rest/api/3/issue/{issueIdOrKey}/attachments endpoint as shown here.
Using CURL inside the command line successfully POSTs the file to the desired issue but it fails to do so inside NodeJS.
I've tried the formdata library along with the https, axios, and node-fetch libraries all to no avail. Each time I format the request accordingly to how it's specified in the documentation and all are returning 404 or 500 errors. Here are the snippets of code I'm trying.
Errors I get:
{
message: 'null for uri: https://mydomain.atlassian.net/rest/api/3/cs-785/attachments',
'status-code': 404
}
500 Internal Server Error
Can anyone provide any insight to what I'm doing wrong or potential solutions? Thanks in advance.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.