0

There are allot of post here about working around this.

My question is, has CORS support been enabled for the exportLinks of googleDrive files yet?

This would be vary nice to have, I see no other reason for an export link.

My specific use case is that I have generated a file on my google drive that I want the user to download. If the user wants to, they can add it directly to their google drive by using this save to drive button. Though, because my server is not a google server, there are Cors errors when attempting to get the file.

The iFrame hack described here is no solution.

Community
  • 1
  • 1
  • Yes, that endpoint is CORS enabled. The hack question you refer to is way out of date and should probably be deleted to prevent misleading new developers. – pinoyyid Jul 20 '14 at 11:54
  • @pinoyyid Unfortunately this is not the case for me. Cors errors are present when attempting to download these files directly to the users google drive. Steps to reproduce: 1. Make a google drive file. 2. With google drive sdk, get an export link of one of those files 3. Use that export link in your application for a user to download the file 4. Use that export link in a [save to drive button](https://developers.google.com/drive/web/savetodrive) 5. Attempt to add that file directly to your google drive. 6. Observe Cors errors in the console. – Duder-onomy Jul 21 '14 at 18:02
  • the problem is step 4. You could try hacking the export link URL to include an access token. – pinoyyid Jul 21 '14 at 21:01

0 Answers0