c# system.net.webexception远程服务器返回错误《404》未找到

图片描述

static void Main(string[] args)
    {
        Qiniu.Conf.Config.Init();
       
        //string bucketName = "123";
        //PutPolicy put = new PutPolicy(bucketName);
        //string uptoken = put.Token();
        ////Console.Write(uptoken);
        PutFile("zcy123", "AA.png", "E:\\Web\\images\\AA.png");
    }

    /// <summary>
    /// 上传文件测试
    /// </summary>
    /// <param name="bucket"></param>
    /// <param name="key"></param>
    /// <param name="fname"></param>
    public static void PutFile(string bucket, string key, string fname)
    {
        var policy = new PutPolicy(bucket, 3600);
        string upToken = policy.Token();
        PutExtra extra = new PutExtra();
        IOClient client = new IOClient();
        client.PutFile(upToken, key, fname, extra);
    }
阅读 5.9k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏