[appengine-java] Re: How to use picasa upload api on Google App Engine
why are you not using another class that implements the MediaSource interface - e.g., MediaByteSource or MediaStreamSource? regards, andr On 11 Nov., 21:22, Ikai L (Google) ika...@google.com wrote: Kishore, Here are the docs related to sending the data as binary:http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_proto... This is the raw protocol. Here are the steps you'll have to take: 1. Accept a file upload and buffer it in memory (http://code.google.com/appengine/kb/java.html#fileforms) 2. Format the authorization headers and POST body as necessary 3. Open an HTTP connection using URLFetch:http://code.google.com/appengine/docs/java/urlfetch/overview.html(Note the limits) You'll need to do some research into the exact format for uploads to the Picasa API. I don't have any code samples for doing this, but it looks very similar to standard HTTP multipart form data with XML metadata. On Tue, Nov 10, 2009 at 8:36 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi Ikai, Thanks for the response. The protocol section describes format of the post body. But the Java guide does not explain how to send binary image data other than teh approach of creating MediaFileSource with the java.io.File as refered at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_java . And Java GAE does not support new File(/home/liz/puppies.jpg) snippet of this sample. Can you please give me a sample or refer to a doc that explains how the other approach (sending binary image data) works in jsp/java world? Thanks in advance - Kishore On Nov 10, 5:58 pm, Ikai L (Google) ika...@google.com wrote: You may want to look here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_proto... If you are looking to upload photos that a user has uploaded, you will not be able to save the image in the file system. You'll have to buffer the data in memory and post to Picasa's API. On Sun, Nov 8, 2009 at 10:43 PM, Kishore Jaladi kishorejal...@gmail.com wrote: Hi, Is there a way to upload files on local file system to picasa on google app Engine? The google app engine cannot read local files. I tried to use GAEVFS (Virtual File system), but I could not figure out how to create MediaFileSource from FileObject. Any help please? - kjaladi -- Ikai Lan Developer Programs Engineer, Google App Engine -- Ikai Lan Developer Programs Engineer, Google App Engine- Zitierten Text ausblenden - - Zitierten Text anzeigen - -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=.
[appengine-java] Re: How to use picasa upload api on Google App Engine
Kishore, Here are the docs related to sending the data as binary: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#PostPhotos This is the raw protocol. Here are the steps you'll have to take: 1. Accept a file upload and buffer it in memory ( http://code.google.com/appengine/kb/java.html#fileforms) 2. Format the authorization headers and POST body as necessary 3. Open an HTTP connection using URLFetch: http://code.google.com/appengine/docs/java/urlfetch/overview.html (Note the limits) You'll need to do some research into the exact format for uploads to the Picasa API. I don't have any code samples for doing this, but it looks very similar to standard HTTP multipart form data with XML metadata. On Tue, Nov 10, 2009 at 8:36 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi Ikai, Thanks for the response. The protocol section describes format of the post body. But the Java guide does not explain how to send binary image data other than teh approach of creating MediaFileSource with the java.io.File as refered at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_java.html#UploadPhotos . And Java GAE does not support new File(/home/liz/puppies.jpg) snippet of this sample. Can you please give me a sample or refer to a doc that explains how the other approach (sending binary image data) works in jsp/java world? Thanks in advance - Kishore On Nov 10, 5:58 pm, Ikai L (Google) ika...@google.com wrote: You may want to look here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_proto... If you are looking to upload photos that a user has uploaded, you will not be able to save the image in the file system. You'll have to buffer the data in memory and post to Picasa's API. On Sun, Nov 8, 2009 at 10:43 PM, Kishore Jaladi kishorejal...@gmail.com wrote: Hi, Is there a way to upload files on local file system to picasa on google app Engine? The google app engine cannot read local files. I tried to use GAEVFS (Virtual File system), but I could not figure out how to create MediaFileSource from FileObject. Any help please? - kjaladi -- Ikai Lan Developer Programs Engineer, Google App Engine -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to use picasa upload api on Google App Engine
You may want to look here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#PostPhotos If you are looking to upload photos that a user has uploaded, you will not be able to save the image in the file system. You'll have to buffer the data in memory and post to Picasa's API. On Sun, Nov 8, 2009 at 10:43 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi, Is there a way to upload files on local file system to picasa on google app Engine? The google app engine cannot read local files. I tried to use GAEVFS (Virtual File system), but I could not figure out how to create MediaFileSource from FileObject. Any help please? - kjaladi -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: How to use picasa upload api on Google App Engine
Hi Ikai, Thanks for the response. The protocol section describes format of the post body. But the Java guide does not explain how to send binary image data other than teh approach of creating MediaFileSource with the java.io.File as refered at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_java.html#UploadPhotos. And Java GAE does not support new File(/home/liz/puppies.jpg) snippet of this sample. Can you please give me a sample or refer to a doc that explains how the other approach (sending binary image data) works in jsp/java world? Thanks in advance - Kishore On Nov 10, 5:58 pm, Ikai L (Google) ika...@google.com wrote: You may want to look here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_proto... If you are looking to upload photos that a user has uploaded, you will not be able to save the image in the file system. You'll have to buffer the data in memory and post to Picasa's API. On Sun, Nov 8, 2009 at 10:43 PM, Kishore Jaladi kishorejal...@gmail.comwrote: Hi, Is there a way to upload files on local file system to picasa on google app Engine? The google app engine cannot read local files. I tried to use GAEVFS (Virtual File system), but I could not figure out how to create MediaFileSource from FileObject. Any help please? - kjaladi -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---