Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

delete file from s3 bucket in laravel 8

use AwsS3S3Client;
use AwsS3ExceptionS3Exception;

    $bucket  =  "bucket";
    $keyname = "keyname";
    $s3 = new S3Client([
    'version' => 'latest',
    'region'  => 'region'
    ]);
    $result = $s3->deleteObject(array(
        'Bucket' => $bucket,
        'Key'    => $keyname
    ));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #file #bucket #laravel
ADD COMMENT
Topic
Name
2+7 =