C# 使用Rackspace上传文件

C# 使用Rackspace上传文件,c#,file-upload,restsharp,rackspace,cloudfiles,C#,File Upload,Restsharp,Rackspace,Cloudfiles,我正在使用RestSharp来使用Rackspace restful API。文档向您展示了如何创建请求,但我不知道需要在何处指定数据源(我要上传到rackspace的文件) 答复是: [{ "bytes": 0, "content_type": "audio\/x-wav", "hash": "d41d8cd98f00b204e9800998ecf8427e", "last_modified": "2012-08-29T17:21:23.423150", "name": "newTest.wa

我正在使用RestSharp来使用Rackspace restful API。文档向您展示了如何创建请求,但我不知道需要在何处指定数据源(我要上传到rackspace的文件)

答复是:

[{
"bytes": 0,
"content_type": "audio\/x-wav",
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"last_modified": "2012-08-29T17:21:23.423150",
"name": "newTest.wav"
}]
因此创建了文件,但文件中没有任何内容,因为大小为0字节

任何帮助都将不胜感激

request.AddFile(localPath);

[{
"bytes": 0,
"content_type": "audio\/x-wav",
"hash": "d41d8cd98f00b204e9800998ecf8427e",
"last_modified": "2012-08-29T17:21:23.423150",
"name": "newTest.wav"
}]
request.AddFile(localPath);