DD.WellWorkover.Cloud/ConsoleApp1/Program.cs

31 lines
987 B
C#
Raw Normal View History

using System;
using System.IO;
namespace ConsoleApp1
{
//var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
// .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
// .Options;
//var context = new AsbCloudDbContext(options);
class Program
2021-10-03 20:08:17 +05:00
{
2021-07-28 09:47:13 +05:00
static void Main(/*string[] args*/)
{
var service = new GoogleDriveFilesService();
var files = service.GetFiles();
Console.WriteLine(files);
var newFolderId = service.CreateFolder("testText.txt");
Console.WriteLine(newFolderId);
var path = "/home/vladimir/TestUploadFile.txt";
var fileInfo = new FileInfo(path);
var fileStream = File.Open(path, FileMode.Open);
var uploadedFileId = service.UploadFile(fileStream, fileInfo.Name, "", "uploaded");
Console.WriteLine(uploadedFileId);
2021-10-06 16:30:46 +05:00
}
}
}