Troubleshooting Minio S3-compatible bucket #51
Unanswered
answerquest
asked this question in
Q&A
Replies: 2 comments
-
|
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Alternative solution : Whenever the endpoint url is a http://IP:port, AnyCloud module is not doing things like prefixing the bucket name to left of endpoint domain. I want to force it keep the same behaviour when the endpoint is an https:// one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thank you to the authors for this plugin.
I've setup a Minio instance (which is S3 equivalent), have created a bucket, made it public, and am trying to configure AnyCloud module with that.
When I put the raw IP address url with port number as aws endpoint in the module configuration, example : http://123.456.789:9000 :: then I'm able to upload media files without any problems, and they appear in the bucket as they should.
I have put in the access key, secret, bucket name also properly.
But then predictably when we browse the items list or go into the item's page, the browser tries to pull in the thumbnail etc having an http:// path, and my omeka S is on a https:// path, hence file loading fails due to CORS.
After this, I setup a subdomain "s3" (A record pointing to by server IP) and reverse-proxied (apache2 setup) the minio instance to the domain, and got it an SSL cert. Let's call it http://s3.mydomain.com . Relevant apache conf snippet:
When I keyed in this domain as aws endpoint, I found that omeka / anycloud is now taking the bucket name and prefixing it to the left of the subdomain to fetch the file, like : https://bucket.s3.mydomain.com/path . (and I acknowledge that this is standard S3 model)
This when the file is readily available on : https://s3.mydomain.com/bucket/path .
And even when I went to upload, I got an error because it was trying to hit a bucket.s3.mydomain.com url which didn't exist.
Shucks. Anyways, to workaround this, I added another subdomain : bucket.s3 (A record pointing to my server IP), added that site in apache and reverse-proxied it this way:
So now I got the url https://bucket.s3.mydomain.com/path proxying to http://127.0.0.1:9000/files1/path .
Entered this into AnyCloud config, and now the fetching of images from the bucket is happening smoothly.
The admin dashboard pulls image thumbnails, files etc on the url https://bucket.s3.mydomain.com/path and my minio bucket is giving them nicely.
But uploading of files isn't working now. Here's the relevant parts of the error:
The frustrating part is that back when i'd just put in http://123.456.789:9000 as the endpoint, there was no bucket name prefixing on left side business, the uploads worked without a hitch, but the file fetching and display weren't working.
And not the file fetching and display are working fine, but uploading of new files isn't working.
It would be wonderful if I could keep a separate endpoint for the upload action which is carried out on the backend / php side, where the basic IP:Port url suffices, and a separate endpoint for the fetch action which is happening at client-side browser side.
I've tried reading through the AnyCloud source code, but this error's stack trace goes down to the vendor libs and I'm not able to interpret it. I don't have much PHP skills unfortunately. Ctrl+Shift+F for keywords hasn't helped.
I also wanted to try replicating the API call that is made to upload the file into the bucket, but the documentation just gets complicated and I'm not able to get a proper api call to shoot from Postman / Bruno.
Seeing that other S3 compatible services like Wasabi are mentioned, I tried changing the config to Wasabi, got same results.
If anyone could help me punch through here, that'd be great. As mentioned earlier, it would be great if I could somehow set the http://IP:port url for just the upload part. What should I change in the code to make this happen?
Beta Was this translation helpful? Give feedback.
All reactions