This question may be already asked and I have gone through most of them and still facing the issue.
I am using c# sdk and trying to download attachments (pptx) from issue.
we are using enterprise server and want to download the attachments.
1. /rest/api/2/attachment/attachmentid which returns the url of the pptx
2. /secure/attachment/{id}/{filename}
I am trying to download from this url but unfortunately it returns only the first 4kb of the file and saves. when I try to open file it says it is corrupted.
can you please guide me how to download the attachment of the issue?
Edit:
I tried to download the file directly using the content link I get from 1st one
by passing Authorization: Basic {stringbase64} it returns 401 always. is there any other way to achieve this?
try this : /rest/api/3/attachment/content/{id}
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.