Add comment of download code.

This commit is contained in:
zicla
2018-07-03 18:06:53 +08:00
parent 23f8efd8d7
commit fbb388badc

View File

@ -459,6 +459,7 @@ func (this *MatterService) sumRangesSize(ranges []httpRange) (size int64) {
} }
//文件下载功能。 //文件下载功能。
//下载功能参考https://github.com/Masterminds/go-fileserver
func (this *MatterService) DownloadFile(writer http.ResponseWriter, request *http.Request, matter *Matter) { func (this *MatterService) DownloadFile(writer http.ResponseWriter, request *http.Request, matter *Matter) {
diskFile, err := os.Open(CONFIG.MatterPath + matter.Path) diskFile, err := os.Open(CONFIG.MatterPath + matter.Path)