C#怎么用后台上传图片,一直返回401
public static void UploadFileWithoutKey(string bucket, string fname)
{
var policy = new PutPolicy(bucket, 3600);
string upToken = policy.Token();
IOClient target = new IOClient();
PutExtra extra = new PutExtra();
PutRet ret = target.PutFileWithoutKey(upToken, "C:\\Users\\Lenovo-Chen\\Desktop\\1.jpg", extra);
//Console.WriteLine(ret.Response.ToString());
}
hHolmes
9 years, 3 months ago
Answers
会不会是因为上传的文件有点大,
默认限制好像不是很大,要在 web.config 里改一下
参考:
http://www.cnblogs.com/zwffff/archive/2009/04/29/1446229.html
http://blog.csdn.net/dxnn520/article/details/15504761
Rellon
answered 9 years, 3 months ago