OGeek|极客世界-中国程序员成长平台

标题: ios - Desire2Learn:如何从新闻附件中下载文件? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 10:03
标题: ios - Desire2Learn:如何从新闻附件中下载文件?

我正在 IOS 中集成desire2Learn。 请在下方找到 News 对象:

{
        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";
    }

我想下载文件。有人可以帮忙吗?



Best Answer-推荐答案


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

关于ios - Desire2Learn:如何从新闻附件中下载文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15811929/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4