1

Hello everyone can you please guide me how can i generate permanent preSignedUrl link from minio server to access the object for long time. because i am using preSignedUrl in my application to preview the object. thanks

umer
  • 49
  • 2
  • 8
  • No, presigned links have a max duration of 7 days. – Anon Coward Aug 05 '22 at 03:43
  • @AnonCoward is there any way by changing bucket policies? – umer Aug 05 '22 at 03:46
  • No. It's a fundamental limit of presigned links. If you want something publicly accessible, then make it public. Otherwise, you'll need to create some sort of endpoint that can generate the presigned links on demand. – Anon Coward Aug 05 '22 at 03:57
  • i make my bucket public and save some pictures in my bucket. but i can't generate url link not more than 7 days expiry time – umer Aug 05 '22 at 04:04

2 Answers2

0

If you want a permanent URL, make sure your objects are public in s3 settings and you can share the s3 URL directly.

Ref: https://aws.amazon.com/premiumsupport/knowledge-center/read-access-objects-s3-bucket/

Rangeesh
  • 361
  • 1
  • 13
0

minio doesn't give a permanent URL as a response but I generate the URL on my own from the bucket, endpoint, and file name, I show you the code, I hope it helps you

 const String bucket = 'bucket name';
 const String endPoint = 'server endpoint URL;
 const String object =  'file name';
 final String finalUrl =
        https://+buckt+.+endpoint+/+object ;

I made the URL based on the structure of my server, maybe ur server has a different structure, go check it first and then make the URL for yourself, and don't forget that u should wait for success response from minio and then make a URL on your own, don't make it before success response.

sina zp
  • 61
  • 1
  • 8