0
我已經使用附件id獲取附件詳細信息,使用rest api執行並從其他api獲取文檔,但是如何讀取該附件並保存在物理文件夾中否關於它是zip文件pdf還是文檔的問題?如何從jira讀取附件並使用Rest Api保存
public Attachment GetAttachment(string attachmentId)
{
var request = new RestRequest()
{
Method = Method.GET,
Resource = ResourceUrls.AttachmentById(attachmentId),
RequestFormat = DataFormat.Json
};
return Execute<Attachment>(request, HttpStatusCode.OK);
}
public class Attachment
{
public string self { get; set; }
public string filename { get; set; }
public Author author { get; set; }
public string created { get; set; }
public int size { get; set; }
public string mimeType { get; set; }
public string content { get; set; }
public string thumbnail { get; set; }
}
但是如何閱讀附件?
如何獲取附件的內容樣本說明?內容屬性我得到的URL爲「JIRA /安全/附件/ 39532/1.doc」,如果我在瀏覽器中使用它提示保存該文件。 – cmj