I'm attempting to use the spring social google library with the driveOperations() implementation. Whenever I attempt to download a file, I get an error. I've even tried to download publicly shared files with no success. Authentication is working.
I've tried the following variations:
Resource resource = google.driveOperations().downloadFile("uniquedocidhere");
// another approach, no error, but getDownloadUrl() is null
DriveFile driveFile = google.driveOperations().getFile("uniqeidhere");
google.driveOperations().downloadFile(driveFile); // 404
// finally trying it with a file drive v2 url gives an invalid URI error
I added drive to the scope so I know that isn't an issue. I'm prompted for drive access when I initially authenticated with the application.
The files in question are google spreadsheets, but I was hoping to have them download as excel files. With stock google SDK, this can be done by getting the exportLinks and then fetching from that URL. While the spring social google library has
final Map<String, String> links = driveFile.getExportLinks();
The export links can't be used because downloadFile doesn't seem to work with the URLs here (or perhaps they are also null).
Does anyone know how to get a file to download with spring social google and drive? I haven't found any sample code that covers drive, only google plus and tasks.
Currently using Spring Boot 1.3.3 / Spring 4.2.5 with Spring Social Google 1.0.0 RELEASE