Why is the upload of an attachment giving the error: net::ERR_CONNECTION_REFUSED

Peter Van Gerwen September 2, 2020

I try to upload a file to the attachments of a Confluence Page. Here is the code:

path="https://ctc-confluence.cochlear.com/rest/api/content/179999202/child/attachment";
formdata = new FormData();
formdata.append('file', 'extratest.xlsx');
formdata.append('data', s2ab(outData));
fetch(path,{method: 'POST', 'X-Atlassian-Token': "nocheck", 'Content-Type':"application/octet-stream", body:formdata})

This results in the error: 
VM9:1 POST https://ctc-confluence.cochlear.com/rest/api/content/xxxxx/child/attachment net::ERR_CONNECTION_REFUSED

What could be wrong?

 

1 answer

1 accepted

0 votes
Answer accepted
Peter Van Gerwen September 6, 2020

Because on the intranet, Confluence resides on http://, and not https://

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events