Course Migration via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to load up a zip file to a canvas course via a url, using php / curl and the API. I keep getting error messages back, and I was wondering if anyone can give me some guidance on what i'm missing. The file I'm trying to upload is on a public url, and is not password protected.
$cURL->post("/courses/42800/content_migrations",array(
"migration_type" => 'zip_file_importer',
"attachment" => array("url" => "https://path_to_d2lexport.zip"),
"pre_attachment" => ''
));
I've tried going about it with trying to upload the file first via the api, but there it gives me back an error that the file is too large.
Any suggestions would be appreciated!