Skip to content

GET请求文件流下载CSV文件 #35

Description

@luanguang

本地和测试站请求都是可以的。但是正是站超过4000条就不行

$response = new Response();
        $response->headers->set('Content-type', 'text/csv');
        $response->headers->set('Content-Disposition', 'attachment; filename="'.$fileName.'"');
        $response->headers->set('Content-length', strlen($content));
        $response->setContent($content);

还想尝试用POST请求来完成,结果POST也是模拟点击用GET。各种排查最后发现,因为nginx临时目录没有写入权限。因为文件流过大的时候,会将这些数据写入nginx的临时目录当中缓存起来。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions