ios - Desire2Learn:如何从新闻附件中下载文件?
<p><p>我正在 IOS 中集成desire2Learn。
请在下方找到 News 对象:</p>
<pre><code>{
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";
}
</code></pre>
<p>我想下载文件。有人可以帮忙吗?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>要检索新闻项目的附件,请使用 <a href="http://docs.valence.desire2learn.com/res/news.html#get--d2l-api-le-%28D2LVERSION-version%29-%28D2LID-orgUnitId%29-news-%28D2LID-newsItemId%29-attachments-%28D2LID-fileId%29" rel="noreferrer noopener nofollow">route that fetches the attachment by file ID</a> .此路由应返回一个文件流,其中包含由您提供的 ID 标识的文件的文件附件数据。在您的情况下,文件 ID 似乎是 <code>401485</code>。</p></p>
<p style="font-size: 20px;">关于ios - Desire2Learn:如何从新闻附件中下载文件?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/15811929/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/15811929/
</a>
</p>
页:
[1]