2013-04-04 69 views
2

我正在整合IOS2中的desire2Learn。 請在下面找到新聞對象:Desire2Learn:如何從新聞附件下載文件?

{ 
     Attachments =   (

         { 
       FileId = 401485; 
       FileName = "iOS Simulator Screen shot 04-Apr-2013 4.09.48 PM.png"; 
       Size = 171857; 
      } 
     ); 
     Body =   { 
      Html = "<p>Audio and file</p> 
\n<p></p>"; 
      Text = "Audio and file 
\n"; 
     }; 
     EndDate = "<null>"; 
     Id = 43905; 
     IsGlobal = 0; 
     IsHidden = 0; 
     IsPublished = 1; 
     ShowOnlyInCourseOfferings = 0; 
     StartDate = "2013-04-04T10:38:00.000Z"; 
     Title = "Audio and File attachment"; 
    } 

我想下載文件。有人可以請幫助。

回答

1

要檢索新聞項目的附件,請使用route that fetches the attachment by file ID。此路線應該返回一個文件流,其中包含用您提供的ID標識的文件的文件附件數據。在你的情況下,文件ID好像是401485