Skip to content

Instantly share code, notes, and snippets.

@evansj
Created July 26, 2013 09:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evansj/6087673 to your computer and use it in GitHub Desktop.
Save evansj/6087673 to your computer and use it in GitHub Desktop.
Use curl to upload files to Alfresco
# this is a quick and dirty way to upload files to an Alfresco instance, useful
# for grabbing logfiles from a server that you can't easily access with scp
curl -k -X POST --user username:password \
-F filedata=@catalina.out.bz2 \
-F siteid=your-site-id \
-F containerid=documentLibrary \
-F uploaddirectory=/logs \
-F filename=catalina.out.bz2 \
-F contenttype="application/x-bzip2" \
https://servername.example.com/alfresco/service/api/upload
@igorbga
Copy link

igorbga commented Nov 19, 2019

" -F contenttype="application/x-bzip2", are you sure this is right? This contenttype seems to refer to the Alfresco type not to the mimetype of the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment