spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.74k stars 1.07k forks source link

DefaultDownloader has a wrong config key #3629

Closed omarherri closed 3 months ago

omarherri commented 4 months ago

In the DefaultDownloader you should update the part:

$context = stream_context_create([
            'ssl' => [
                'verify_peer' => config('media-library.ssl'),
                'verify_peer_name' => config('media-library.ssl'),
            ],
            'http' => [
                'header' => 'User-Agent: Spatie MediaLibrary',
            ],
        ]);

By the correct config options:

$context = stream_context_create([
            'ssl' => [
                'verify_peer' => config('media-library.media_downloader_ssl'),
                'verify_peer_name' => config('media-library.media_downloader_ssl'),
            ],
            'http' => [
                'header' => 'User-Agent: Spatie MediaLibrary',
            ],
        ]);

This ensure to use the latest config file.

omarherri commented 3 months ago

I made a pull request for that #3634

freekmurze commented 3 months ago

This has been fixed in the latest version.