Upload File Access to the Media Library via API
Is there API access to upload files to a users Media Library? I can't find reference to it specifically but perhaps it's something that's been documented elsewhere. Thanks for any assistance you can provide:
Answers
-
At the moment, it's only video and audio files that go into the media library. It would be interesting to know whether using the API to upload create a File Topic and upload a video using
POST /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)/structure/
will put the content into Media Library or into module files as per the legacy way.
-
I'm pretty confident it's not going to end up in the media library using that endpoint. The documentation you linked to requires a map to the eventual home for the file with this example file path:
/content/enforced/
orgunit_id
-
org_id
/
newfilename
)
Media Library has a different file location altogether, separate from the content area in a given course, and seemingly specific to the user, rather than to the course. -
Ah good point. I think in that case it's pretty definite that there isn't a (documented) API for the media library.