Skip to content
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

Private Files cannot be accessed #2

Open
dalelantofindshare opened this issue May 18, 2018 · 1 comment
Open

Private Files cannot be accessed #2

dalelantofindshare opened this issue May 18, 2018 · 1 comment

Comments

@dalelantofindshare
Copy link

Hello!
Thank you for this tut. I only have one issue, its even if I create my superuser account and log in, I still cannot view the private files. Is there any kind of solution here? Thanks

@weelng
Copy link

weelng commented Jan 23, 2019

Hi, not sure if you had resolve your issue however I am dropping by with an answer that I know of:
in your storage_backends.py, add the following code, querystring_auth = True and it should instantaneously turn the direct URLs into signed URLs from S3.

Eg

class PrivateMediaStorage(S3Boto3Storage):
    location = settings.AWS_PRIVATE_MEDIA_LOCATION
    default_acl = "private"
    file_overwrite = False
    custom_domain = False
    querystring_auth = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants