-
Notifications
You must be signed in to change notification settings - Fork 665
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
RiakCS - Making object publicly accessible #894
Comments
we also have ruby code that connects to riak cs with fog-aws gem. They have sort of a "public option"
So the image can be accessed publicly. I need the same functionality with golang. |
@IvanLuber , setting the bucket policy is the correct approach. It looks like a Riak CS bug in parsing media type from content-type header. You should raise your issue on RiakCS project. |
hi @poornas , thanks for your quick response. I'm also still confused about "prefix" string. I presumed if I upload something to bucket named "uploads" with key "image/object1" , then that object have prefix equal to "image". furthermore, An empty prefix ("") is possible (if object stored directly under the bucket). (Is it true?) I am somewhat new to Riak and cloud computing, I hope you can explain it to me. |
@IvanLuber Riak only supports BucketACLs we do not support that in minio-go and are not planning to support it in near future. What Riak needs to implement is SetBucketPolicy API http://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html |
Ok @harshavardhana , I'll raise this issue to RiakCS rightaway. |
@harshavardhana @poornas , in the issue page I raised in riak_cs repo (basho/riak_cs#1346) , could it really be an issue in minio-go ? To clear things up,
but got error 415 unsupported media when setting policy. |
Can you set riakcs.TraceOn(os.Stderr) in your code and send us the trace output ? |
Here is the output :
|
@IvanLuber , if you look at the last part of the trace |
@poornas , I'va passed it to basho/riak_cs#1346 , |
@IvanLuber, that's right - policies can only be set at the bucket level.However, you should be able to access an object in a private bucket if you generate the url via PresignedGetObject method. You could get the trace of that command as well. |
@IvanLuber closing this as its no longer actionable to us at minio. Please feel free to reopen if you think we have to discuss this more. |
Hi, I've been using minio-go to upload and download image files (PutObject and GetObject) in Riak CS (AWS Signature version 2), and It works splendidly.
But Problem arised when there's a need to access those images with URLs. I got 'access denied' when requesting this url through my browser :
thehost/bucket_name/file_name
*I put the file directly under the bucket.
I tried using SetBucketPolicy :
err = minioClient.SetBucketPolicy("bucketname", "", policy.BucketPolicyReadWrite)
But I got '415 Unsupported Media Type' error (same error when using
./mc policy
command line)I also tried using PresignedGetObject, it returns an URL, but still AccessDenied
Is there a way to upload an object (image) publicly as default ?
Best Regards again, its a great service.
The text was updated successfully, but these errors were encountered: