【发布时间】:2011-06-16 12:57:48
【问题描述】:
Rackspace Cloud 文件,PutStorageItem 方法被声明为采用本地文件路径,我可以使用变量来代替吗?
API PutStorageItem(string ContainerName, string localFilePath);
我的方法被声明为
UploadItem(string username, string apiKey, string ContainerName, byte[] Item)
{
UserCredentials userCredentials = new UserCredentials(new Uri("https://auth.api.rackspacecloud.com/v1.0"), username, apiKey, null, null);
Connection connection = new com.mosso.cloudfiles.Connection(userCredentials);
connection.PutStorageItem(ContainerName, Item); //<--- X here
}
如您所见,PutStorageItem 采用本地字符串路径,但 Item 被声明为 byte[]。 我可以使用变量而不是本地路径吗?
【问题讨论】:
标签: c# asp.net string byte rackspace-cloud