上記のトピックを扱う多くの質問があることを理解しています。しかし、Heroku iOS Railsチュートリアル(https://devcenter.heroku.com/articles/ios-photo-sharing-geo-location-service#deploy-to-heroku)を使用してアプリからs3にスクリーンショットをアップロードすると、 herokuからPUTを成功させる:
2012-10-10T06:28:39 + 00:00 app [web.1]:2012-10-10 06:28:39 +00002012-10-10T06:28に163.120.70.10のPOST"/photos"を開始しました:39 + 00:00 app [web.1]:PhotosController#createによるJSONとしての処理2012-10-10T06:28:39 + 00:00 app [web.1]:パラメーター:{"photo" => {" owner "=>" f93a107d8795c73d085cab1fbbb9ff2c "、" image "=>#>}} 2012-10-10T06:28:39 + 00:00 app [web.1]:[paperclip]添付ファイルを保存しています。
レコードがpregresqlテーブルに到達したようです。pregresqlテーブルには次のものがあります。
{"photos":[{"created_at": "2012-10-10T02:39:28Z"、 "id":1、 "image_content_type":null、 "image_file_name":null、 "image_file_size":null、 "image_updated_at" :null、 "owner": "f93a107d8795c73d085cab1fbbb9ff2c"、 "updated_at": "2012-10-10T02:39:28Z"}、{"created_at": "2012-10-10T02:49:23Z"、 "id":2 、"image_content_type":null、 "image_file_name":null、 "image_file_size":null、 "image_updated_at":null、 "owner": "f93a107d8795c73d085cab1fbbb9ff2c"、 "updated_at": "2012-10-10T02:49:23Z"}、 {"created_at": "2012-10-10T05:07:01Z"、 "id":3、 "image_content_type":null、 "image_file_name":null、 "image_file_size":null、"image_updated_at":null、 "owner": "f93a107d8795c73d085cab1fbbb9ff2c"、 "updated_at": "2012-10-10T05:07:01Z"}、{"created_at": "2012-10-10T05:26:55Z"、 "id ":4、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012-10-10T05:26:55Z "}、{" created_at ":" 2012-10-10T05:31:37Z "、" id ":5、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、 "owner": "f93a107d8795c73d085cab1fbbb9ff2c"、 "updated_at": "2012-10-10T05:31:37Z"}、{"created_at": "2012-10-10T05:50:16Z "、" id ":6、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012- 10-10T05:50:16Z "}、{" created_at ":" 2012-10-10T06:07:54Z "、" id ":7、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null 、"image_updated_at":null、 "owner": "f93a107d8795c73d085cab1fbbb9ff2c"、 "updated_at": "2012-10-10T06:07:54Z"}、{"created_at": "2012-10-10T06:10:19Z"、 " id ":8、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":"f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012-10-10T06:10:19Z "}、{" created_at ":" 2012-10-10T06:17:00Z "、" id ":9、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012-10-10T06:17:00Z "}、{" created_at ":" 2012- 10-10T06:19:24Z "、" id ":10、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at " :"2012-10-10T06:19:24Z"}、{"created_at": "2012-10-10T06:19:34Z"、 "id":11、 "image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012-10-10T06:19:34Z "}、{" created_at ":" 2012-10-10T06:28:16Z "、" id ":12、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、" updated_at ":" 2012-10-10T06:28:16Z "}、{" created_at ":" 2012-10-10T06:28:39Z "、" id ":13、" image_content_type ":null、" image_file_name ":null、" image_file_size ":null、" image_updated_at ":null、" owner ":" f93a107d8795c73d085cab1fbbb9ff2c "、"updated_at": "2012-10-10T06:28:39Z"}]} michael-blums-macbook-pro:cloudglyph-server
ご覧のとおり、これは多くのテストアップロードです。しかし、残念ながら、それらのうちの1つがs3バケットにヒットすることはなく、HerokuログにS3に到達したかどうかについての表示はありません。明確にするために、AWSクレデンシャルエラーなどのエラーはありません。最初は、s3バケットへの読み取り/書き込みアクセス権を持つIAMユーザーを使用し、次にメインのクレデンシャルに切り替えました。
私のherokuサーバーは、開発設定に設定された単一のホストであり、すべてのawsクレデンシャルは、上記のリンク先のチュートリアルで指定されているように.envに保存されます。
何か案は?
前もって感謝します