Created
September 21, 2011 14:39
-
-
Save trevorturk/1232220 to your computer and use it in GitHub Desktop.
Basecamp API: example uploading a file and attaching to a message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -v -H 'Accept: application/xml' -F Filedata=@/path/to/file https://trevorturk.basecamphq.com/upload | |
curl -v -H 'Accept: application/xml' -H 'Content-Type: application/xml' -u TOKEN:X \ | |
-d " | |
<post> | |
<title>Test</title> | |
<body>Test</body> | |
<attachments> | |
<file> | |
<file>ID_FROM_FIRST_REQUEST</file> | |
<original-filename>ORIGINAL_FILENAME</original-filename> | |
</file> | |
</attachments> | |
</post>" \ | |
https://trevorturk.basecamphq.com/projects/PROJECT_ID/posts.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment