I am trying to add an attachment to issue with help of the Restv2 documentation.
But the request is error out with "Bad request" below is the request :
where as the file_filedata has the binarycontent value of the file
method:POST path:rest/api/2/issue/CECHP-5632/attachments
Content-Type:multipart/form-data
Accept:application/json
accept-encoding:gzip, deflate
Header Parameters:
X-Atlassian-Token:no-check
FormBody Parameters:
file_FileData:Cg0NCrQAAABNPCsaAQAAAP
filename:null
bytes:null
contentType:null
name:null
originalFilename:StormControlEnabled.pcapng
description:null
size:null
uri:null
url:null
empty:null
open:null
Hi @Sandhya PS
I haven't worked with "binarycontent value of the file", but when I use the regular API, to upload the file using the file path, the API works just fine. I couldn't find the parameter "file_FileData" in the documentation either.
Can you try to use the File path directly instead of the binary data here? Also, try to replace "file_FileData" with only "file" when adding the path.
Thank you for the reply.
But the file is in the different application like a file which contains the file name and binary content value.
So would need a way to map those value to REST V2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you're trying to upload the attachments directly to Jira from another application?
If Yes, it may not work from what I've tested. You might need to setup a server in between Jira and the other tool, and make a script that can pull images from one place and then push them to another.
Found a few old Threads for this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.