Open mcirami opened 6 months ago
ed7bdb0ae8295b47d8f70f261bc5c7d62ed7cbd6
This appears to have been looked at/updated in the past for 1.6.
It's trying to get an icon url from S3 by dynamically mashing together php configs with vue's loop variables.
S3 is complaining that the filename key given is empty. Unless you have/had a pre 1.6 template that's still cached?
What OS is this on? What do you have in your S3 config? (Without exposing credentials of course) Do you have either of the following set? 'root' => "/" (Maybe try with or without this) 'directory_separator' => '/' (Might be needed on Windows?)
Seems there is similar issues
https://github.com/laravel/framework/issues/42136
->
https://github.com/laravel/framework/issues/41964
https://github.com/thephpleague/flysystem-aws-s3-v3/issues/293
You're also contradicting a bit "This has worked up until now." and " but this was happening before I even upgraded." If emptynick had it "working" I have no reason to doubt it was for him, so I gotta lean towards a configuration difference possibly?
so I didn't have 'root' => "/" in there. I added that and now admin comes up but it strips the first letter of the path like one of the posters said.
I'm on a Mac, My S3 config contains:
'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 'throw' => false, 'root' => '/'
alright, I figured it out. the AWS_URL url was missing from my env file. didn't need that root after all. I'm just using the bucket path as the AWS_URL. Admin and all images are working now.
Thank you for you help!
Laravel version
10.10
PHP version
8.1
Voyager version
1.7
Database
8.0
Description
I'm using s3 in my voyager Storage Config. I get a 500 server error when trying to access /admin this is the message in my log: Found 1 error while validating the input provided for the GetObject operation: [Key] expected string length to be >= 1, but found string length of 0 {"view":{"view":"/var/www/linkpro-new/vendor/tcg/voyager/resources/views/media/manager.blade.php"
just to test, I went into that file and commented out lines 8-10 and I was able to get past the error and bring up the admin panel. This is what I commented out: `
Steps to reproduce
Set 's3' as the Storage Config in voyager config file. Go to /admin and login.
Expected behavior
Be able to use 's3' as my storage config and pull up the admin panel without any errors. This has worked up until now.
Screenshots
No response
Additional context
I just upgraded to 1.7 but this was happening before I even upgraded.