Closed GoogleCodeExporter closed 9 years ago
I suspect you're using a gdata-python-client < 2.0. I just checked the
libraries, and PDF support wasn't available for some releases of gdata, and
thus wasn't in the SUPPORTED_FILETYPES dict defined in gdata.docs.service.
Though I just tried to upload a PDF, and while it found the correct mimetype, I
got:
{'status': 415, 'body': 'Content-Type application/pdf is not a valid input
type.', 'reason': 'Unsupported Media Type'}
Maybe PDF upload isn't supported through the API...
Original comment by tom.h.mi...@gmail.com
on 23 Jun 2010 at 2:00
I got the latest from http://code.google.com/p/gdata-python-client/ and install
afresh, i'm still getting Unexpected extension: PDF, is it looking for some
particular meta data? My file was a tex->ps->pdf file.
Original comment by hemanth...@gmail.com
on 23 Jun 2010 at 2:12
Here's the solution:
http://code.google.com/p/gdata-issues/issues/detail?id=591#c77
You need to edit that file in your version in the same way the commenter did
Original comment by childo...@gmail.com
on 23 Jun 2010 at 4:57
I followed the steps outlined in the link provided by childoftv above with
regards to making changes to the service.py file. I still cannot get it to
work for PDF uploads to docs. I have gdata-2.0.10 and googlecl-0.9.8 installed
on Windows 7. I get:
{'status': 415, 'body': 'Content-Type application/pdf is not a valid input
type.', 'reason': 'Unsupported Media Type'}
Original comment by elymiran...@gmail.com
on 28 Jul 2010 at 3:55
Hey elymiranda1972 sorry about that...you also need to update the
corresponding section in the google cl src/docs/service.py in the same way.
new_entry = self.Post(entry, post_uri, media_source=media,
extra_headers={'Slug': media.file_name,'GData-Version': 3}
(the 'GData-Version': 3 is what matters)
Original comment by childo...@gmail.com
on 28 Jul 2010 at 9:06
Also make sure that:
post_uri = '/feeds/default/private/full'
in the upload_single_doc function
Original comment by childo...@gmail.com
on 28 Jul 2010 at 9:08
[deleted comment]
Bingo! That did it. Thanks!
Original comment by elymiran...@gmail.com
on 28 Jul 2010 at 10:15
[deleted comment]
[deleted comment]
r371 (finally) includes a non-hackish solution! Give it a try, let me know if
you run into problems.
Original comment by tom.h.mi...@gmail.com
on 9 Aug 2010 at 5:13
Original issue reported on code.google.com by
hemanth...@gmail.com
on 23 Jun 2010 at 10:08