Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel upload file to aws s3

use IlluminateSupportFacadesStorage;

$file_upload = Storage::disk('s3')->put('/folder_name', $request->file);

//must have in .env
AWS_ACCESS_KEY_ID=access_key
AWS_SECRET_ACCESS_KEY=secret_key
AWS_DEFAULT_REGION=region
AWS_BUCKET=bucket_name
AWS_USE_PATH_STYLE_ENDPOINT=false
Source by packagist.org #
 
PREVIOUS NEXT
Tagged: #laravel #upload #file #aws
ADD COMMENT
Topic
Name
4+6 =