Having Django serve downloadable files

后端 未结 15 1555
野的像风
野的像风 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

    It was mentioned above that the mod_xsendfile method does not allow for non-ASCII characters in filenames.

    For this reason, I have a patch available for mod_xsendfile that will allow any file to be sent, as long as the name is url encoded, and the additional header:

    X-SendFile-Encoding: url
    

    Is sent as well.

    http://ben.timby.com/?p=149

提交回复
热议问题