我知道有很多关于上述主题的问题。但是当我通过 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 +0000 2012-10-10T06:28 开始为 163.120.70.10 发布“/照片” :39+00:00 app[web.1]: 由 PhotosController 处理#create as 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 表,它具有:
{"照片":[{"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, "所有者":"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
如您所见,这是大量的测试上传。但是很可惜,他们中没有一个人到达了 s3 存储桶,而且 heroku 日志中没有任何迹象表明它是否到达了 S3。需要明确的是,我没有诸如 AWS 凭证错误之类的错误。起初,我使用了一个对我的 s3 存储桶只有读/写访问权限的 IAM 用户,然后切换到我的主凭证。
我的 heroku 服务器是一个设置为开发设置的主机,我的所有 aws 凭据都存储在 .env 中,如上面链接的教程中所述。
有任何想法吗?
提前致谢