When you create an attachment, the response will include a related URL in the links section. You ca use this URL to upload the contents of the attachment. This URL is a Pre-Signed URL from S3 and provides access to upload a file for a limited duration.
Example command to upload an attachment to the related Pre-Signed URL
$ curl --upload-file [full path to file] "[Pre-Signed URL]"
Click Try It! to start a request and see the response here!