Ebeo / google-gdata

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

documents3 needs an uploadFile method #327

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For arbitrary file uploads, the user passes the ?convert=false parameter on 
the /feeds/default/private/full URL to specify that the file should not be 
converted to a native Google Doc. UploadDocument() also checks the 
DocumentsAllowedTypes. A new uploadFile() method should also accept a
a String for the contentType.

http://code.google.com/p/google-
gdata/source/browse/trunk/clients/cs/src/documents3/documentservice.cs?
r=935#105

Original issue reported on code.google.com by ericbide...@gmail.com on 4 Feb 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Added an UploadFile to the DocumentService

Added a CreateFile to the DocumentsRequest class

Original comment by fman...@gmail.com on 9 Feb 2010 at 10:53

GoogleCodeExporter commented 9 years ago

Original comment by fman...@gmail.com on 9 Feb 2010 at 10:54

GoogleCodeExporter commented 9 years ago
When using UploadFile I get the following exception when trying to upload 
arbitrary files

This call works: 
DocumentEntry newEntry1 = service.UploadFile("C:\\temp\\options.PNG",
"options.PNG.1", "image/png", true);

but these does not:
DocumentEntry newEntry1 = service.UploadFile("C:\\temp\\options.PNG",
"options.PNG.1", "image/png", false);

DocumentEntry newEntry = service.UploadFile("C:\\temp\\config.php", "config.1",
"application/unknown", true);

Exception:

An unhandled exception of type 'Google.GData.Client.GDataRequestException' 
occurred
in Google.GData.Client.dll

Additional information: Execution of request failed:
http://docs.google.com/feeds/default/private/full?convert=false

Original comment by thomas.t...@gmail.com on 17 Feb 2010 at 7:36

GoogleCodeExporter commented 9 years ago
What is the exact error (check the ResponseString property on the exception). 
AFAIK, arbitrary file upload is not 
yet enabled on the server for all accounts....

Original comment by fman...@gmail.com on 17 Feb 2010 at 9:14

GoogleCodeExporter commented 9 years ago
I guess arbitrary file upload is enabled on my account, because I can upload 
any type
of file via the web interface. I have uploaded both .avi and .jpg files and
de-selected the document conversion with success.
But I must say that the response string does tell me that I do not have access 
to
uploading arbitrary files?

The exception is thrown in "public virtual void Execute()" in class 
GDataRequest line 779
Here is the exception response string:

<errors xmlns="http://schemas.google.com/g/2005">
<error>
  <domain>GData</domain> 
  <code>rateLimitExceeded</code> 
  <internalReason>Rate limit exceeded, lower query rate</internalReason> 
  <extendedHelp>Request rate limit exceeded.</extendedHelp> 
</error>
</errors>

Any help is appreciated

Original comment by thomas.t...@gmail.com on 17 Feb 2010 at 1:22

GoogleCodeExporter commented 9 years ago
I got this:

Upload any file is turned on for all accounts in the Docs UI.
Upload any file is only turned on for Apps premier accounts in the API.

The rateLimitExceeded (terrible error) is what we through if a account
tries to upload an arbitrary file type (or use convert=false) and they do not 
have
permission to do so.

Is it possible that you do not have a premier account?

Original comment by fman...@gmail.com on 17 Feb 2010 at 5:22

GoogleCodeExporter commented 9 years ago
Yes that is why. I didn't know that there were that limitation. I have bought 
extra
web space so therefor I thought I was allowed to do that. Damn. Do you know if 
this
is a feature to come? Thanks for your help.

Original comment by thomas.t...@gmail.com on 17 Feb 2010 at 8:57

GoogleCodeExporter commented 9 years ago
I would bet on the fact that this will be coming.

But i can not tell you when exactly. You should ask this in the googleapps 
forum, where representatives of that 
service can answer the question.

Original comment by fman...@gmail.com on 2 Mar 2010 at 11:04

GoogleCodeExporter commented 9 years ago
.3622++*9949546

Original comment by k.rambab...@gmail.com on 27 Mar 2010 at 9:54