Laravel and AWS Cloudfront

后端 未结 2 1119
夕颜
夕颜 2021-01-04 17:54

I was researching and read a lot of articles on one specific topic but couldn\'t find relevant answers anywhere.

However I\'m doing some things as a fun/private proj

相关标签:
2条回答
  • 2021-01-04 18:29

    Set url to your cloudfront url in config/filesystems/s3

    's3' => [
            'driver' => 's3',
            'key' => env('AWS_KEY'),
            'secret' => env('AWS_SECRET'),
            'region' => env('AWS_REGION'),
            'bucket' => env('AWS_BUCKET'),
            'url' => 'http://xxx.cloudfront.net']
    

    It works in L5.5

    0 讨论(0)
  • 2021-01-04 18:39

    You can use this package https://github.com/publiux/laravelcdn

    Content Delivery Network Package for Laravel

    The package provides the developer the ability to upload his assets (or any public file) to a CDN with a single artisan command. And then it allows him to switch between the local and the online version of the files.

    0 讨论(0)
提交回复
热议问题