Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

This is strange. I have a mix of public as well as private files. I want normal urls in public files and signed urls in private files.

I tried to change AWS_QUERYSTRING_AUTH to False as I see by default, it's True in django-storages.

But, when I change it, my private files URL is not signed (thus not accessible).

Maybe I am missing something here. What can be the solution?

1 Answer

0 votes
by (44.3k points)

AWS_QUERYSTRING_AUTH sets the default behaviour. You can pass in an additional argument to the initializer and override it when you create an instance of S3BotoStorage:

S3BotoStorage(bucket="foo", querystring_auth=False)

So, if there are two buckets, one public and one private. You can set the querystring_auth argument properly to get the behaviour you want.

Browse Categories

...