Comments (3)
Yes you need to define the constant upfront. We had to that because the original land main use case of the S3 repo is its integration with our backup engine. Since it's typically installed in publicly accessible folders and the server may or may not support .htaccess / web.config access controls we have the die statement to prevent any accidental directory disclosure from error messages.
I'll update the README to note that. Thank you for the heads up!
from s3.
We currently do not implement Amazon S3's HeadObject. This leaves you with two options.
One option is listing the bucket (getBucket
) and see if the object exists.
The other option is trying to retrieve the first byte of an object, e.g.
try {
$dummy = $s3->getObject($bucket, $objectPath, null, 0, 1)
$fileExists = true;
} catch (Exception $e) {
$fileExists = false;
}
This method isn't ideal and may outright fail if you have objects with certain storage types like Glacier.
I can definitely try to implement HeadObject.
from s3.
As I don't plan to have thousands of files in a bucket folder at the same time, the Connector::getBucket()
should do the job :)
By the way, I see defined('AKEEBAENGINE') or die();
inside the classes. Do I need to define the constant upfront of there is a better way to use the classes?
THANK YOU!
from s3.
Related Issues (20)
- getAuthenticatedURL with HTTPS? HOT 3
- Solved: PHP Config Issue - small file upload works, files over 2MB fail HOT 8
- Question: Syntax for Creating Folders HOT 1
- Error::setCode() throws TypeError HOT 4
- getBucket() and file timestamp HOT 5
- getBucket() looks like there is a limit of 999 files HOT 4
- getBucket() $maxKeys usage HOT 1
- Cannot upload empty files - Missing input parameters HOT 3
- Presigned upload URLS HOT 3
- getAuthenticatedURL does not honor setUseLegacyPathStyle HOT 1
- getObject cannot get XML files HOT 2
- PHP warnings after last update HOT 5
- Any way of testing from localhost? [Question] HOT 1
- Receiving SignatureDoesNotMatch errors after upgrading from 2.0.0 HOT 2
- Upgrading from version 2.0 HOT 6
- Add an option to switch between `X-Amz-Date` and `Date` HOT 1
- Support for DreamObject s3 HOT 1
- Support for Digital Ocean Spaces? HOT 3
- Documentation without using Composer HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3.