I have two zip files hosted on Google Drive that are publicly accessible over the internet. They are here and here.

For some reason, the first file is not returning the content-Length header with the response, so when downloading the file I can't read the size to display progress.

The second file works fine. I've tested this with my own download code, Chrome and another download manager. None of them are receiving the size of the first file when downloading but all work correctly with the second, so it must be a Google Drive issue.

Why is Google Drive behaving in this way? How can I resolve it.

  • You should be using the Google Drive API to download files like this. – Ramhound Apr 10 '15 at 17:20
  • 1
    @Ramhound why's that? That's not going to resolve the content-length header issue. – Will Calderwood Apr 10 '15 at 17:21
  • You won't need to use content-length information you can just determine the size through the API. Why is that? Because that is the proper way to download a file, within a program, that exists on Google Drive. – Ramhound Apr 10 '15 at 17:23
  • 1
    @Ramhound I have a generic download method already written, why add it more code that I have to test? Google Drive supports direct downloads over HTTP so why not just do that? Why should I need to make the extra call to the server? It also give me the flexibility of moving my hosting off Google Drive with zero effort. – Will Calderwood Apr 10 '15 at 17:27
  • 1
    @Ramhound My code is not the problem here. The problem here is Google Drive not returning the Content-Length header for one file. – Will Calderwood Apr 10 '15 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.