Oh boy. I just took a look at the API and if the contents is a directory, it returns an array of content files, not a single file. This is kind of tricky because we don't want to return an `object` here.

Not sure why that returns an array for a directory to be honest.