3

Added .NET Amazon SDK to my project, and was able to upload images to Amazon S3 with no problems, both on my local server and AppHarbor.

Then I added this line to set the expiration header on upload to S3:

request.AddHeader("Expires", DateTime.Now.AddYears(10).ToString("r"));

This works just fine from my local server, correctly setting the Expires header on S3.

But when I push this code to AppHarbor, I get the following build error:

error CS1061: 'Amazon.S3.Model.PutObjectRequest' does not contain a definition for 
'AddHeader' and no extension method 'AddHeader' accepting a first argument of type 
'Amazon.S3.Model.PutObjectRequest' could be found (are you missing a using directive or 
an assembly reference?)

Thanks very much for your help!

4

1 に答える 1

1

AppHarborビルド出力をダウンロードし、ローカル IIS で実行して、参照が機能し、AWS SDK バージョンが正しいことを確認する必要があります。

于 2012-02-03T20:09:49.670 に答える