C# 七牛 断点续传 ResumablePutFile(string bucket, string key, string fname) 失败

C# 七牛 断点续传 ResumablePutFile(string bucket, string key, string fname) 失败

 public static void ResumablePutFile(string bucket, string key, string fname)
    {
        Console.WriteLine("\n===> ResumablePutFile {0}:{1} fname:{2}", bucket, key, fname);
        PutPolicy policy = new PutPolicy(bucket, 3600);
        string upToken = policy.Token();
        Settings setting = new Settings();
        ResumablePutExtra extra = new ResumablePutExtra();
        extra.Bucket = bucket;
        ResumablePut client = new ResumablePut(setting, extra);
        client.Progress += new Action<float>((p) =>
        {
            Console.WriteLine("当前进度:{0}%", p * 100);

        });
        client.PutFinished += new EventHandler<CallRet>((o, ret) =>
        {
            if (ret.OK)
            {
                Console.WriteLine("上传成功:{0}", ret.Response);

                if (File.Exists(fname))
                {
                    File.Delete(fname);
                }
            }
            else
            {
                Console.WriteLine("上传失败:{0}", ret.Response);
            }
        });
        client.PutFile(upToken, fname, Guid.NewGuid().ToString());
    }

调试代码进入 ret.OK ,但是七牛对应的空间没有,空间是私有,
图片上传(115.jpg),断点续传上传(key=116.jpg,但是上传后就变了“”) 结果图下图

application/octet-stream 还是一个字节流。
请问如何解决断点续传问题,并在上传完成之后 删除本地图片?

查看回复