I am trying to delete file from Amazon S3.
PHP Code:
<?php
$file = $_POST['file'];
var_dump($file);
include('s3_configExpansion.php');
ini_set('max_execution_time', 600);
// File upload into S3
if ($s3->deleteObject($bucket, $file))
{
$msg = "S3 Delete Successful.";
}
echo 'Deleted';
?>
I used this code for deleting. I have received the file at $file
variable.
$file = 'folder/subfolder/filename.apk';
But file is not deleting from S3.