2

I see a number of routes to upload various files into D2L, including News, Content modules and the like - http://docs.valence.desire2learn.com/basic/fileupload.html however, is there a route to update a file into the "Manage Files" area of an org? For example to programmatically create a CSV for the CCB tool and upload it to the proper location?

The org that I have is one for "Course Branding" and the content path is something like go to the course->edit course-Manage files and the Url /content/enforced/7974-ACB/ and there are 4 subdirectories there. I'd like to create a file in one of the subdirectories but not sure what the route should be. Any ideas?

Chris

1 Answers1

1

Currently, you can only add files to an org unit's Manage Files area if that org unit has course content, because you must use the course content APIs to add the file data. You must also create a course content topic of type file in order to upload file data to the course's Manage Files area.

The Url property for the ContentObjectData JSON you send up indicates where in the course's Manage Files area the uploaded file will get stored: it must therefore be a legal path within your course's existing content space, and a file name that's not yet been used. Note that you can't update the underlying file you've already uploaded, or delete it, through the API. However, you can delete the content topic used to insert the file in the first place: the content topic will go away, but the underlying file will remain behind in the Manage Files area.

This is not a pleasant workaround, but it does seem to be a workaround.

Viktor Haag
  • 3,363
  • 1
  • 18
  • 21