1 year ago

Using Flysystem, how do I get uploaded files' Storage::url to return the correct CNAME

Posted 1 year ago by nexxai

I've set up the DNS CNAME just fine and it's working, but when I upload files (working fine), the url it returns is:

rather than

I'm uploading the files like this:

    $storagelocation = Storage::put('uploads', request()->file('upload'));
    $url = Storage::url($storagelocation);

In my config/filesystems.php, I've tried adding

        'cname' => '',

        'cname' => '',

        'base_url' => '',

but nothing seems to work. Does anyone have any experience with this?

Please sign in or create an account to participate in this conversation.