PHP | Amazon S3 | Check if a file or folder already exists on Amazon S3 Bucket

|
| By Webner

To check if a file or folder already exists on Amazon S3 Bucket, use the following code

Code:

$info = $client->doesObjectExist($bucket, $FileName)
if ($info)
{
echo 'File exists';
}
else
{
echo 'File does not exists';
}

Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Web development or any other software development assistance please contact us at webdevelopment@webners.com

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *