@ctaljaardt Check your namespaces because apparently League\Flysystem\AwsS3v3\AwsS3Adapter doesn't exist.
Have you imported it at the top of your file? Please show the full file that you gave us an excerpt of above.
Hello
I have a problem, im trying to upload a file to amazon s3 and im having a problem with the filesystem. i have set up the settings in the config with my information. and ive pulled in the composer package.
Here is a sample of my code
public function uploadfile(Request $request, $category)
{
$file = Input::file('file');
$originalname = Input::file('file')->getClientOriginalName();
$newname = str_random(32);
$password = str_random(20);
$newpath = storage_path("temp/");
$extension = Input::file('file')->getClientOriginalExtension();
$move = Input::file('file')->move($newpath, $originalname);
shell_exec('7z a -p' . $password . ' -r ' . $newpath . $newname . '.7z ' . $newpath . $originalname);
Storage::disk('s3')->put('/downloads/' . $category . '/' . $newname . ".7z", file_get_contents($newpath . $newname . '.7z'));
}
Here is the error message im getting http://cl.ly/image/3q060P2J2Q0M
Here is a copy of my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"graham-campbell/markdown": "~3.0",
"illuminate/html": "5.*",
"aws/aws-sdk-php": "^3.0@dev"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev",
"prefer-stable": true
}
@ctaljaardt Check your namespaces because apparently League\Flysystem\AwsS3v3\AwsS3Adapter doesn't exist.
Have you imported it at the top of your file? Please show the full file that you gave us an excerpt of above.
Please or to participate in this conversation.