My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 271: Error when trying to upload a file
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by meghasal...@gmail.com, May 11, 2010
What steps will reproduce the problem?
1. Make a valid connection to the google account
2.try to upload a doc file using gdata-1.41.2
3.

What is the expected output? What do you see instead?

File should be uploaded on google data of the account but instead it is 
throwing the following error:
com.google.gdata.util.InvalidEntryException: Could not convert document.
<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>InvalidEntryException</code>
<internalReason>Could not convert document.</internalReason>
</error>
</errors>

	at 
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:590)
	at 
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:563)
	at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(HttpGDataRequest.java:550)
	at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:530)
	at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:535)
	at com.google.gdata.client.media.MediaService.insert
(MediaService.java:400)


What version of the product are you using? On what operating system?
gdata 1.41.2 on windows XP SP3

Please provide any additional information below.

I am trying to upload a doc file and i am able to make valid connection to 
google account but unable to upload any doucument. Here is my code for 
uploading:
File file = new File("D:\\Testing.doc");
String mimeType = DocumentListEntry.MediaType.fromFileName(file.getName
()).getMimeType();
DocumentEntry newDocument = new DocumentEntry();
newDocument.setFile(file, mimeType);
newDocument.setTitle(new PlainTextConstruct(file.getName()));
DocumentListEntry uploaded = service.insert(documentListFeedUrl, 
newDocument);

Please help me to resolve this issue.

Thanks,
Megha
Sign in to add a comment

Powered by Google Project Hosting