Desire2Learn:如何从新闻附件下载文件?

时间:2013-04-04 12:59:46

标签: ios desire2learn

我在IOS中集成了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 个答案:

答案 0 :(得分:1)

要检索新闻项的附件,请使用route that fetches the attachment by file ID。此路由应返回一个文件流,其中包含使用您提供的ID标识的文件的文件附件数据。在您的情况下,文件ID似乎是401485