【发布时间】:2012-03-07 00:52:05
【问题描述】:
目前我正在使用 viddler 来上传不同的服务和视频。我还想在亚马逊 s3 服务器上提供内容备份服务。为了开发这项服务,我使用了适用于 .NET 的 AWS 开发工具包。当我尝试上传将 URL 作为文件路径传递的文件时,出现以下错误:"the specified file does not exist"
我的问题是:AWS SDK 是否支持以编程方式或任何其他方法从另一个域上传内容到 s3?
我的代码:
PutObjectRequest titledRequest = new PutObjectRequest();
titledRequest.WithMetaData("title", "the title")
//.WithContentBody("this object has a title")
.WithBucketName(bucketName)
.WithFilePath("http://download.microsoft.com/download/9/2/2/9222D67F-7630-4F49-BD26- 476B51517FC1/FileFormatConverters.exe") //does url support?
.WithTimeout(3600000)
.WithReadWriteTimeout(3600000)
.WithKey("test.ext");
using (S3Response responseWithMetadata = client.PutObject(titledRequest))
{
}
【问题讨论】:
-
为什么你的
WithFilePath参数中有空格? -
@Dave 它的错误 .WithFilePath("download.microsoft.com/download/9/2/2/…) 我认为亚马逊 s3 不支持拉取文件请求
标签: c# amazon-s3 amazon-web-services video-streaming cloud-hosting