Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 media source - getObjectContents() not returning file content #16497

Open
muzzwood opened this issue Nov 20, 2023 · 0 comments
Open

S3 media source - getObjectContents() not returning file content #16497

muzzwood opened this issue Nov 20, 2023 · 0 comments
Labels
bug The issue in the code or project, which should be addressed.

Comments

@muzzwood
Copy link
Contributor

Bug report

Summary

When using an S3 media source, and calling getObjectContents(), the file content is not returned.
This method should behave the same, whether it's filesystem, ftp, or S3 media source.

This might be because modS3MediaSource doesn't override modMediaSource::getObjectContents(). I'll try to look into this further soon.

Step to reproduce

Call getObjectContents() on an S3 media source. e.g.

$image = $this->source->getObjectContents($filePath);

Observed behavior

$image['content'] will be empty. If the same was done on a filesystem media source, the file content would exist.

Expected behavior

getObjectContents() should have the same behaviour regardless of the type of media source.

Environment

MODX 3.x, AWS S3

@muzzwood muzzwood added the bug The issue in the code or project, which should be addressed. label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

1 participant