mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
新增downloadFile接口,支持下载限定目录下任意文件 (#3073)
This commit is contained in:
@@ -725,6 +725,9 @@ void HttpResponseInvokerImp::responseFile(const StrCaseMap &requestHeader,
|
||||
return;
|
||||
}
|
||||
|
||||
// 尝试添加Content-Type
|
||||
httpHeader.emplace("Content-Type", HttpConst::getHttpContentType(file.data()));
|
||||
|
||||
auto &strRange = const_cast<StrCaseMap &>(requestHeader)["Range"];
|
||||
int code = 200;
|
||||
if (!strRange.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user