Skip to content

Instantly share code, notes, and snippets.

@liangchaoboy
liangchaoboy / qiniu_put_file.go
Created September 25, 2017 11:34 — forked from jemygraw/qiniu_put_file.go
qiniu_put_file.go
package main
import (
"context"
"flag"
"fmt"
"net/url"
"os"
"time"
@liangchaoboy
liangchaoboy / gist:53debed20204a1da0b9674f23dcf65a5
Created October 16, 2019 14:33 — forked from Dillie-O/gist:2480125
Amazon S3 Download File with Prompt
public static void DownloadObject(string keyName)
{
string[] keySplit = keyName.Split('/');
string fileName = keySplit[keySplit.Length - 1];
string dest = Path.Combine(HttpRuntime.CodegenDir, fileName);
using (client = Amazon.AWSClientFactory.CreateAmazonS3Client())
{
GetObjectRequest request = new GetObjectRequest().WithBucketName(bucketName).WithKey(keyName);