Is there a way to unzip or expand an uploaded file through the API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Community,
I am uploading a .zip file as part of a migration utility from our old LMS to Canvas. I am unable to figure out a way to unzip a file once it has been upload. I am wondering if anyone has run into this scenario. I know we can expand a .zip from the Canvas file upload interface. I am trying to do the same through the API.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @syed_alli ,
I have had a poke around in the API documentation and can confirm that there does not appear to be any mechanism to do so at this time.
So there are a couple of ways you could approach this. Firstly, if this is something you would love to see in Canvas you could log a Feature Idea in the https://community.canvaslms.com/community/ideas?sr=search&searchId=502a161f-0f79-4563-b432-e5372b5b8... space.
In the mean time, you could (in theory) create a script to upload a series of pre-extracted files to the API, rather than a simple zip. Depending on the scale of how many you need to do, you may find it easier to visit each of the files through the web interface and unzip them that way.
With this approach, you would need to account for creating folders and uploading into the correct folders. I would recommend this approach if you are looking to do this on a very large scale (more than say 50-100 zips).
Hope that helps!
Stuart