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

Author - 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

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

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

Send your message