Having Django serve downloadable files

后端 未结 15 1571
野的像风
野的像风 2020-11-22 05:46

I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded.

For instance, I\'d like the URL to be something

15条回答
  •  孤独总比滥情好
    2020-11-22 06:46

    I have faced the same problem more then once and so implemented using xsendfile module and auth view decorators the django-filelibrary. Feel free to use it as inspiration for your own solution.

    https://github.com/danielsokolowski/django-filelibrary

提交回复
热议问题