salimoha / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Unable to upload arbitrary files to Google Docs #394

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to upload a file, such as a ZIP, to Google Docs.
2. An error is returned saying only Apps Premier users can upload arbitrary 
files.

What is the expected output? What do you see instead?
I expect to see the file uploaded.

Here's what happens instead:
C:\Users\Nicholas\Desktop>google docs upload --no-convert
Please specify src: somefile.zip
Loading somefile.zip
Failed to upload somefile.zip: Server responded with: 403, <errors 
xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>Serv
iceForbiddenException</code><internalReason>You do not have permission to 
perform this operation.</internalReason></error></errors>
Only Apps Premier users can upload arbitrary file types without using the 
Google Docs web uploader.

What version of the product are you using? On what operating system?
googlecl-win32-0.9.13, Windows 7

Please provide any additional information below.
Google has now allowed all users to upload arbitrary file types. See this blog 
post 
http://googleappsdeveloper.blogspot.com/2011/05/upload-all-file-types-to-any-goo
gle.html. A Google employee also posted that it is enabled on all accounts, 
seen here: 
http://code.google.com/apis/documents/forum.html?place=msg%2Fgoogle-documents-li
st-api%2FMdfqFMS4yHI%2FyNx8oQ_4YdIJ.

It appears that it is necessary to use the resumable upload feature to make 
this work. I assume that googlecl currently doesn't use this? It'd be great if 
support for uploading arbitrary files to Google Docs worked in GoogleCL.

Original issue reported on code.google.com by nicholas...@gmail.com on 22 May 2011 at 2:13

GoogleCodeExporter commented 9 years ago
Take a look at this:
http://code.google.com/p/googlecl/wiki/Manual#Docs
Note: Uploading arbitrary files is only possible for Apps Premier customers, 
using the --no-convert option. See the FAQ.

Original comment by KanK...@gmail.com on 18 Jul 2011 at 9:18

GoogleCodeExporter commented 9 years ago
Does this change anything?
http://googleappsdeveloper.blogspot.com/2011/05/upload-all-file-types-to-any-goo
gle.html

Original comment by connealy...@gmail.com on 5 Sep 2011 at 8:35

GoogleCodeExporter commented 9 years ago
I'm still seeing this in v0.9.13; trying without no-convert, I get messages 
like so:

Loading bar.zip
Failed to upload bar.zip: Server responded with: 403, <errors 
xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>Serv
iceForbiddenException</code><internalReason>Files must
be uploaded using the resumable upload 
mechanism.</internalReason></error></errors>
You may have to specify a format with --format. Try --format=txt

Are resumable uploads supported? If not, what would be involved?  The API 
itself should support them and should have since May.

Original comment by torquem...@gmail.com on 11 Oct 2011 at 11:22

GoogleCodeExporter commented 9 years ago
I am also seeing the same issue. I am trying to upload Docx,PDF with convert = 
false.

Original comment by TestUser...@gmail.com on 18 Oct 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Something's changed.  "google docs upload" has worked for me since the 
beginning of 2011, (v 0.9.10) but has recently (in the last couple of weeks) 
started reporting "Files must be uploaded using the resumable upload 
mechanism."  I tried with v0.9.13 - same problem. Hmmm.. something's changed 
google.

Original comment by frazer.b...@gmail.com on 1 Nov 2011 at 9:59

GoogleCodeExporter commented 9 years ago
This fixes the resumable uploader problem for me with gdata 2.0.14 and Ubuntu 
Lucid. It probably won't work for the older versions of gdata, so it's not 
commit-ready yet, but it may fix this for you.

I also had trouble with gdata 2.0.15 and haven't figured that out yet so I 
haven't tried this fix with that version, either.

Original comment by Coilamg on 7 Nov 2011 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
The latest commit (r587) should fix this problem. You can find it here:
http://code.google.com/p/googlecl/source/detail?r=587

After many hours of research and testing, we've discovered that not all 
python-gdata versions support uploading to Google Docs. Some can only support 
uploads of certain types. More info on that here:
http://code.google.com/p/googlecl/wiki/UploadingGoogleDocs

Original comment by Coilamg on 9 Dec 2011 at 9:44

GoogleCodeExporter commented 9 years ago
no, this is not really fixed.
my python-gdata is python-gdata-2.0.14-1.fc16.noarch which based on the link 
above should be just fine for uploading ANY file - yet googlecl still fails 
anyway...

Original comment by milosgaj...@gmail.com on 24 Jan 2012 at 3:49