douju3911 2014-07-19 20:23
浏览 41
已采纳

RiakCS S3 PHP客户端库

Is there any RiakCS S3 PHP client library out there? The best I could find was S3cmd command line client software.

Also I've seen there is Riak PHP Client, but it looks like there is nothing related to S3.

I've installed aws-sdk-php-laravel and used same credentials as for RiakCS S3 but it doesn't seem to work. Error message below:

The AWS Access Key Id you provided does not exist in our records.

Thank you for any guidance or advice.

  • 写回答

2条回答 默认 最新

  • doujian1050 2014-07-21 22:38
    关注

    Actually, if you are using Riak, it wouldn't be a proxy, it would be a completely different endpoint. So you should do it this way with the base_url option:

    $s3 = S3Client::factory([
        'base_url'       => 'http://127.0.0.1:8080',
        'region'         => 'my-region',
        'key'            => 'my-key',
        'secret'         => 'my-secret',
        'command.params' => ['PathStyle' => true]
    ]);
    

    Using 'command.params' allows you to set a parameter used in every operation. You will need to use the 'PathStyle' option on every request to make sure the SDK does not move your bucket into the host part of the URL like it is supposed to do for Amazon S3.

    This is was all talked about on an issue on GitHub.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程