浏览代码

测试多个图片下载

liuzejian 1 年之前
父节点
当前提交
82c0c176dc
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      modules/Video/Http/Controllers/VideoSeriesWechatCheckController.php

+ 3 - 3
modules/Video/Http/Controllers/VideoSeriesWechatCheckController.php

@@ -106,10 +106,10 @@ class VideoSeriesWechatCheckController extends CatchController
     }
 
     public function test(Request $request) {
-        foreach (['1228789.jpg', 'images.png'] as $i) {
-            return Response::streamDownload(function () use($i){
+        foreach (['1228789.jpg'] as $i) {
+            return Response::stream(function () use($i){
                 echo file_get_contents(app_path($i));
-            });
+            }, 200, ["Content-Type" => 'image/jpg',' Content-Disposition' => "attachment;filename=aaa.jpg"]);
         }
     }
 }