|
@@ -131,9 +131,8 @@ func (fe *FileEntry) Cache() *os.File {
|
|
|
}
|
|
|
var res *http.Response
|
|
|
var err error
|
|
|
- log.Println("Caching file:", fe.GFile.Name)
|
|
|
// Export GDocs (Special google doc documents needs to be exported make a config somewhere for this)
|
|
|
- switch fe.GFile.MimeType {
|
|
|
+ switch fe.GFile.MimeType { // Make this somewhat optional
|
|
|
case "application/vnd.google-apps.document":
|
|
|
log.Println("Exporting as: text/markdown")
|
|
|
res, err = fe.fs.srv.Files.Export(fe.GFile.Id, "text/plain").Download()
|
|
@@ -159,7 +158,6 @@ func (fe *FileEntry) Cache() *os.File {
|
|
|
}
|
|
|
io.Copy(fe.tempFile, res.Body)
|
|
|
|
|
|
- log.Println("Caching done", fe.GFile.Name)
|
|
|
fe.tempFile.Seek(0, io.SeekStart)
|
|
|
return fe.tempFile
|
|
|
|