Skip to content

Instantly share code, notes, and snippets.

View henrikj242's full-sized avatar

Henrik 242 Jensen henrikj242

View GitHub Profile
@henrikj242
henrikj242 / GoogleCloudStorageFileExhange.cs
Last active January 29, 2024 20:43
Use the Google Cloud API to upload and download files to/from a bucket using explicit authentication in a C# app.
using Google.Apis.Auth.OAuth2; // Google.Apis.Auth --version 1.30.0
using Google.Cloud.Storage.V1; // Google.Cloud.Storage.V1
using System;
using System.IO;
using System.Runtime.InteropServices;
using static System.Console;
public static class Program
{
public static void Main(string[] args)