Created
December 29, 2010 22:50
-
-
Save lfborjas/759173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From af2a754c5f89945a9f38e1006c6d84bc44cef554 Mon Sep 17 00:00:00 2001 | |
From: lfborjas <luis.borjas@escolarea.com> | |
Date: Wed, 29 Dec 2010 16:34:48 -0600 | |
Subject: [PATCH] fixed pdf upload in docs service | |
--- | |
src/gdata/docs/service.py | 6 ++++-- | |
1 files changed, 4 insertions(+), 2 deletions(-) | |
diff --git a/src/gdata/docs/service.py b/gdata/docs/service.py | |
index 9dd1f21..14c6e7d 100644 | |
--- a/src/gdata/docs/service.py | |
+++ b/src/gdata/docs/service.py | |
@@ -149,14 +149,16 @@ class DocsService(gdata.service.GDataService): | |
except AttributeError: | |
uri = folder_or_uri | |
else: | |
- uri = '/feeds/documents/private/full' | |
+ uri = '/feeds/default/private/full' | |
+ | |
+ uri = uri.replace('folders', 'default') + '/contents' if not 'contents' in uri else uri | |
entry = gdata.docs.DocumentListEntry() | |
entry.title = atom.Title(text=title) | |
if category is not None: | |
entry.category.append(category) | |
entry = self.Post(entry, uri, media_source=media_source, | |
- extra_headers={'Slug': media_source.file_name}, | |
+ extra_headers={'Slug': media_source.file_name, 'GData-Version': 3}, | |
converter=gdata.docs.DocumentListEntryFromString) | |
return entry | |
-- | |
1.7.0.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment