Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Learning is a never ending thing and just one life is not enough to learn all the things you want to learn. The ocean of knowledge is very, very deep. This blog has been created for the same objective. I write on things which I come across in my daily life and feel to share it with the people across the world. The blog publish articles on SQL Server, SSIS 2005, SSIS 2008 alongwith other useful stuff which are good to know for the professional life.
Browse by Tags · View All
Google SpreadSheet API 12
YouTube API with .NET 7
PEGA Tutorials 6
PRPC Tutorials 6
Google BigQuery 6
Google Analytics API in .NET 6
Google Cloud Services 5
Core Reporting API with C# 4
Good Data API with Picasa 4
Ms-Excel function 4

Archive · View All
June 2012 17
October 2012 12
May 2012 12
August 2012 11
March 2013 10
July 2012 10
December 2011 9
January 2012 7
September 2012 6
February 2012 6

SinghVikash Blog

How to upload multiple images to Picasa Web Album with Google Data API?

May 20 2012 12:00AM by Vikash Kumar Singh   

This post is next in series of our learning of Google Data API library. We have learnt quite a few things about Google Data API and how to Picasa web album externally.

We have learn how to upload single image to Picasa Web Album. In this post we will learn how we can upload multiple image to Picasa web album. We will upload the images to our recently created Picasa web album “Google is the Best”. We created this album in our post How to create new Picasa Web Album with Google Data API – Part 4?

I have designed following interface to upload multiple images to Picasa Web Album. We have a OpenFileDialog control on this form. Clicking on Browse button will launch the Open File Dialog box and we will select multiple image. The selected images will be added in the list view control. After clicking on Upload All Images button; the .NET code will upload all images to our Picasa web Album.

I am importing following Google Data API namespace in this program under each post.

using Google.GData.Client;
using Google.GData.Photos;
using Google.GData.Extensions;
using Google.GData.Extensions.Location;
using Google.Picasa;

The .NET code snippet on "Browse" button is following:

private void button1_Click(object sender, EventArgs e)
    {
        openFileDialog1.Multiselect = true;
        openFileDialog1.ShowDialog();
        foreach(string myfile in openFileDialog1.FileNames)
        {
            listView1.Items.Add(new ListViewItem(myfile));
        }
}

The .NET code snippet on "Upload All Images button is following:

private void button2_Click(object sender, EventArgs e)
    {
//Create new Picasa Service
        PicasaService myPicasa = new PicasaService("Vikash-Test-Picasa");
        myPicasa.setUserCredentials("abc@gmail.com", "abcpassword");

//Create new URI by passing userid and AlbumID
        Uri newURI = new Uri(PicasaQuery.CreatePicasaUri("abc", "5737335314773942337"));

//Upload all images to Picasa
        foreach(ListViewItem photoFile in listView1.Items)
        {
    System.IO.FileInfo newFile = new System.IO.FileInfo(photoFile.Text);
    System.IO.FileStream neFStream = newFile.OpenRead();
    PicasaEntry newEntry = (PicasaEntry)myPicasa.Insert(newURI, neFStream, "Image/jpeg", "Test");
    neFStream.Close();
    }
    System.Windows.Forms.MessageBox.Show("All Image has been uploaded");
}

After setting up the code; I run the form and click on Browse button. It open the Open File Dialog box. I have selected four images from my local machine folder.

I have added the selected images in the list view control. So we have total four images in the list that we are going to upload.

The next thing I did was to click on Upload All Images button. The code run successfully and uploaded all the images to our Picasa Web Album "Google is the Best".

I log into my Picasa web account and check the web album Google is the Best. The four images which I uploaded through .NET interface were right up there.

So our objective to upload multiple images have been achived.

Thanks! For reading till this point.


Republished from Blog by Vikash Kumar Singh [46 clicks].  Read the original version here [0 clicks].

Vikash Kumar Singh
279 · 0% · 152
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"How to upload multiple images to Picasa Web Album with Google Data API?" rated 5 out of 5 by 1 readers
How to upload multiple images to Picasa Web Album with Google Data API? , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]