usethis::use_zip throwing error that download is MIME type 'application/binary'

I am trying to use usethis::use_zip to download and unpack a ZIP file into a local folder of files.

    url = ""

I get the error:

Error: Download does not have MIME type 'application/zip'. Instead it's 'application/binary'.

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

You can try replacing ?dl=1 with ?raw=1 to obtain a 'direct' link to the zip file.

Or you can just download.file the URL and unzip it using unzip. Obviously this does not come with the benefits of use_zip.

1 Like

Thanks @hughparsonage. Replacing with ?raw=1 gives me:

Error: Content-Disposition header doesn't start with 'attachment'. Actual header: 'inline; filename=""; filename*=UTF-8'''

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.