-
Notifications
You must be signed in to change notification settings - Fork 33
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
TASK: Add MinIO compatibility #37
base: main
Are you sure you want to change the base?
Conversation
@@ -394,6 +394,9 @@ protected function getRelativePublicationPathAndFilename(ResourceMetaDataInterfa | |||
{ | |||
if ($object->getRelativePublicationPath() !== '') { | |||
$pathAndFilename = $object->getRelativePublicationPath() . $object->getFilename(); | |||
} elseif (isset($this->s3DefaultProfile['minio']) && $this->s3DefaultProfile['minio']) { | |||
// If MinIO is used we have to change to url style. Creating an object beneath an object is not supported | |||
$pathAndFilename = $object->getSha1() . '_folder/' . $object->getFilename(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etlam Can you point to the Minio document discussing this limititation ? I use Minio for a few project with Flow ... don't know if i'm lucky but it work with just the path style configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a valid discussion, but is it actually failing for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we use Sitegeist.Kaleidoscope in our project. I do not know if it would fail without Kaleidoscope.
@robertlemke @kdambekalns I can confirm that Minio did not have the limitation that this PR try to solve. Running a project and currently URL like But |
If you use for example Sitegeist.Kaleidoscope the original image gets saved as A folder and a file can not have the same name and be located in the same folder: Maybe there is a more elegant way to prevent that there is a file and a folder with the same name. |
See #42 |
Yes, you have to use AWS S3 can use a file as a folder and store more files inside of it, MinIO can not do this. We can close the pull request if using Sitegeist.Kaleidoscope with MinIO is a special case. |
Still not sure this is an issue with Sitegeist.Kaleidoscope, nor that it is a general issue:
Since the hash is dependent on the file contents, two different files will have a different hash, and as long storage and target have separate buckets (as required for the S3 adapter), there should never be a clash… Are you in fact using seperate buckets for storage and target, @etlam? |
This pull requests adds compatibilty for MinIO.
Problems with MinIO:
use_path_style_endpoint=true
must be used