Skip to content

What could be the cause of this 'Illegal offset type' error for file uploads? #46930

Answered by Angel5a
Ifriqiya asked this question in Q&A
Discussion options

You must be logged in to vote

It can be that your env is not local and you are trying to fetch a whole s3 config array in place where only a string needed.

    protected function profilePhotoDisk()
    {
        if (config('app.env') == 'local') {
            return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('jetstream.profile_photo_disk', 'public');
        } else {
            return config('filesystems.disks.s3', 's3');
        }
    }

Revert all the changes to HasProfilePhoto you made, and change the 'profile_photo_disk' option in the config/jetstream.php (you can introduce ENV if you wish, a write same logic over env checking).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ifriqiya
Comment options

Answer selected by Ifriqiya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants