Beispiel #1
0
 private void init()
 {
     current_file_path = "";
     gdrive_helper = new GoogleDriveHelper();
     List<File> root_file = gdrive_helper.GetRoot();
     render(root_file);
 }
        static void Main()
        {
            GoogleDriveHelper gdrive_helper;
            string            current_file_path;
            var CSV_PATH = "\\Users\\PATH-TO-CSV"; //Add Location for .csv file if you want to read data from CSV
            var reader   = new System.IO.StreamReader(System.IO.File.OpenRead(CSV_PATH));

            while (!reader.EndOfStream)
            {
                //Read File
                var line = reader.ReadLine();
                //Split CSV Data
                var values = line.Split(',');

                //Extract Values out of Split Data
                var id      = values[0];
                var title   = values[1];
                var videoid = values[2];


                //Call Google Drive helper
                gdrive_helper = new GoogleDriveHelper();
                //Get file by Google Drive File ID
                var a = gdrive_helper.GetFileById(videoid);
                //Download the Stream of file using Google's API
                var stream = gdrive_helper.DownloadFile1(a, string.Format(@"C:\FilesFromGoogleDrive\{0}", a.Title));
                //Upload the Stream as Blob using Azure Storage API FROM DATA STREAM
                ProcessAsync(stream, newTitle).GetAwaiter().GetResult();
                Console.WriteLine(a.Title);
            }
        }
Beispiel #3
0
        private void init()
        {
            current_file_path = "";
            gdrive_helper     = new GoogleDriveHelper();
            List <File> root_file = gdrive_helper.GetRoot();

            render(root_file);
        }