I am using S3 and Alibaba OSS in my django project as the storage classes. Have used url field in the table to refer to the object in the storage. But the url is not permanent. Like for s3, we have pre-signed url, currently it expires in 1 hour. How can I make sure the url is always valid url ?

  1. What is the best practice to store url for storage system in this case ?
  2. what metadata should I store besides url, if I need to re-create the url after it gets expired ? May be bucket name etc.

Also how can I refresh/re-create my url after it gets expired ?

1

There are 1 answers

0
iamheru On

Do you ever checked the documentation?

I would like to suggest you to read it at here: https://www.alibabacloud.com/help/doc-detail/39607.htm

SDK Reference for Python: https://www.alibabacloud.com/help/doc-detail/32033.htm

Generate a signed URL: https://www.alibabacloud.com/help/doc-detail/31952.htm