Hi, I'm trying to access the attachments in JIRA Software via the REST API. I can access the URL but I'm trying to get the contents of the URL and display it on a webpage. I think I'm getting a bit confused and was hoping someone could help!
The url comes from the API but it's easier just to put it in as a string here to show you what I've been doing so far!
string url= "https://www.myurl.com/secure/attachment/13149/image-2019-04-02-16-25-18-458.png";
WebRequest myReq = WebRequest.Create(url);
string credentials = "username:pwd";
CredentialCache mycache = new CredentialCache();
myReq.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));
myReq.Method = "GET";
myReq.ContentType = "image/png";
WebResponse wr = myReq.GetResponse();
Stream receiveStream = wr.GetResponseStream();
StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);
string content = reader.ReadToEnd();
Could anyone show me examples or give me some help as to what the next step should be after retrieving the file?
Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events