How can I allow a user to download a file which is stored outside of the webroot?

前端 未结 4 1215
无人及你
无人及你 2020-12-06 07:27

I am developing a system which allows registered users (who could be anybody) to upload files. I\'ve block mime-types etc. to attempt to restrict the files to .doc, .docx a

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-06 08:00

    You can put your files directory in root and apply mod rewrite rules to secure and show a virtual path to the users instead of real path.

提交回复
热议问题