Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Null issue comment attachment

api

Hi all. I try to get all issue attachments. I correct get issue attachment by calling public FileEN GetAttachment(int issueId, int fileId). But i need get all attachments what issue contains. I see what IssueCommentEN has field "Attachment" but it always null. How i can get comment attachments?

I'm using C# language and api library Gemini API v3.7.0.2711. Thank you.

Tayphoon
· 1
Tayphoon
Replies (7)
helpful
0
not helpful

GetComment API should do that.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thank you for your answer. I make next method. But commetn.Attachment is still null: private IssueAttachment[] GetIssueAttachmentsInternal(Int32 issueID, Int32 issueTypeID) { List attachments = new List(); attachments.AddRange((from pv in _serviceManager.IssuesService.GetAttachments(issueID) select pv.GetIssueAttachment(issueTypeID)).ToArray()); CounterSoft.Gemini.Commons.Entity.IssueCommentEN[] comments = _serviceManager.IssuesService.GetComments(issueID); foreach (IssueCommentEN commetn in comments) { if (commetn.Attachment != null) attachments.Add(commetn.Attachment.GetIssueAttachment(issueTypeID)); } return attachments.ToArray(); }

I try use GetComment method to but nothing changed it is null.


Tayphoon
· 1
Tayphoon
helpful
0
not helpful
ANSWER

Sorry, you need to call the GetCommentAttachment api to get the comment's attachment. It will not be returned with the comment for performance reasons.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Thank it's work fine.


Tayphoon
· 1
Tayphoon
helpful
0
not helpful

I noticed that then i use GetCommentAttachment and GetAttachments it return me FileEN with all data(FileData not null). But i need method that return only attachment info (name, type, lenght, etc.). I'm can't found any methods wich do it, gemini API can't do that? Thank you.


Tayphoon
· 1
Tayphoon
helpful
0
not helpful

Unfortunately, that is not possible at the moment.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

it's a pity(. Thank you.


Tayphoon
· 1
Tayphoon