Following is the code snippet I am using:
openFileDialog.Filter = "Movie Files|*.mov";
DialogResult result = openFileDialog.ShowDialog();
if (result == DialogResult.OK)
{
string[] files = openFileDialog.FileNames;
// Open each file and display the image in PictureBox1.
// Call Application.DoEvents to force a repaint after
each
// file is read.
foreach (string file in files)
{
System.IO.FileInfo fileInfo = new
System.IO.FileInfo(file);
System.IO.FileStream fileStream =
fileInfo.OpenRead();
this.FileInfo.Text = "Starting upload....";
PhotoEntry entry = new PhotoEntry();
UserState ut = new UserState();
ut.opType = UserState.OperationType.upload;
this.states.Add(ut);
String contentType =
MediaFileSource.GetContentTypeForFileName(file);
entry.MediaSource = new
Google.GData.Client.MediaFileSource(fileStream, file, contentType);
//this.picasaService.InsertAsync(new
Uri(this.photoFeed.Post), entry, ut);
PhotoEntry returnedVideo=
(PhotoEntry)this.picasaService.Insert(new Uri(this.photoFeed.Post),
entry);
------------------------------------------------------------------------------------------------------------------------------
However, this is giving an exception "Request timed out". I also tried
using "PicasaEntry" instead of "PhotoEntry" and using InsertAsync()
instead of Insert(). The exception indicates that the request failed.
Is it that the video upload is not supported for free account? I am
asking this because when I tried to manually upload the .mov file
through web site, the uploaded file was actually seen as image file. I
still need to try whether the Picasa client application supports
uploading video, though.
Any help in sorting this out is appreciated.
--
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-picasa-data-api?hl=en.