Currently there is no way to attach a file to an issue using API.
Metadata Update from @pingou: - Issue tagged with: RFE
Metadata Update from @wombelix: - Issue set to the milestone: 6.0