Upload File Access to the Media Library via API

Options
Jared.B.606
Jared.B.606 Posts: 4 🌱
edited March 25 in Development

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:

https://docs.valence.desire2learn.com/basic/fileupload.html

Tagged:

Answers

  • Steve.B.446
    Steve.B.446 Posts: 67
    Options

    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.

  • Jared.B.606
    Jared.B.606 Posts: 4 🌱
    Options

    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.

  • Steve.B.446
    Steve.B.446 Posts: 67
    Options

    Ah good point. I think in that case it's pretty definite that there isn't a (documented) API for the media library.