Skip to content

Instantly share code, notes, and snippets.

@THPubs
Last active July 2, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save THPubs/301f17b03c333370e7c48b3646084f6e to your computer and use it in GitHub Desktop.
Save THPubs/301f17b03c333370e7c48b3646084f6e to your computer and use it in GitHub Desktop.
alfresco-upload
const form = new FormData();
form.append('filedata', fs.createReadStream(`tmp/abc.txt`));
const alfrescoResponse = await axios({
method: 'POST',
url: `https://${host}/nodes/-my-/children?alf_ticket=${alfrescoLoginTicket}`,
headers: {
'Content-Type': 'multipart/form-data'
},
data: form
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment