//1) Get input stream from a blobstore file and the blobinfo metas
final BlobInfo blobInfo = new BlobInfoFactory().loadBlobInfo(blobKey);
BlobstoreInputStream blobStoreReader = null;
try {
blobStoreReader = new BlobstoreInputStream(blobKey);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//2) create a new document list entry
DocumentListEntry newDocument = new DocumentListEntry();
// 3) set the inputstream as a source for the new document entry
newDocument.setMediaSource(new MediaStreamSource(blobStoreReader,
blobInfo.getContentType()));
newDocument.setTitle(new PlainTextConstruct(
blobInfo.getFilename()));
// 4) upload - feedUrl > https://docs.google.com/feeds/myu...@email.ext/private/full?convert=false
DocsService client = new DocsService("BlobStore2Docs");
client.insert(feedUrl, newDocument);
Excuse for the spaghetti code ^^
I hope this useful for you.
Cheers
PS: If you are interested I've developed a "BlobStore2Docs.java" that resolve the problem. If you want contact me for any reason.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.