-
Notifications
You must be signed in to change notification settings - Fork 280
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
Get a permanent URL for object #588
Comments
There can't be a permanent presigned URL. What you can do instead is, create objects whose names are: public/obj1 And make the prefix more about mc: https://github.com/minio/mc |
@krishnasrinivas is there a way to have URLs to public objects without making an API call to Minio? I want to render pages with images and videos served directly from the Minio server. |
To list objects one needs to make an API call you can use following CLI to get the list as well alternatively.
|
Yes, you can serve images/videos directly from Minio server to web-browser without authentication if you set the the policy on the bucket as "download"
more about mc: https://github.com/minio/mc |
After set the policy of specific bucket to
|
@harshavardhana Is there a way I can get the same results using Python Client API? In fact what interests me the most is the |
You have to construct the url yourself. You know endpoint, bucket and you have object name. |
@harshavardhana
How can I retrieve this endpoint: |
Please come to slack.minio.io for discussion like these, we can avoid discussing here on closed issues or feel free to open a new one under minio-py |
These stuff are really useful, but not well documented. The discussion here is confusing but does help at the end. Thanks |
@phuyem the documentation is not capturing FAQs ATM. We are working on finishing it for further usefulness and clarity. |
Anyway to hide the port? |
Hi, |
Use Proxy server |
What is the equivalent API call to this CLI command that will provide me the same output? I am using minio java SDK version 8.3.0 and the API methods available in io.minio.messages.Item class doesn't seem to provide a property that would give me the absolute URL to itself (object) Any pointers? |
You can use list objects api and presigned get url. Also you can make the bucket public using policy so you can directly access the objcets |
This is useful |
Had to use note the |
some built in policies are provided for ease of use and convenience. Please check you could export the policy using
|
All my files are public as they are for images etc. Is there no way using the python API just to get the URL of these. Using predesigned URL on public images doesn't make sense in this case and it seems a bit of a round about way to have to construct URL from name, bucket, end point etc without just being able to call something like object_url. |
@hiven , If bucket is public the url would be like |
Hey, there is provision for getting a preSignedUrl but we need to supply an expiry time.
Is it possible to get a permanent link to the object, so that the url can be saved in the db upon completion of put object request? How to correctly set the bucket policy for this, as the policies listed are not the same as the policies in S3?
The text was updated successfully, but these errors were encountered: