我有一个 API,可以将StreamingReponse( https://fastapi.tiangolo.com/advanced/custom-response/?h=fileresponse#streamingresponse ) 输出为 zip/gz。当我下载文件 VIA Swagger 时,我得到一个非常奇怪的名称,例如:
application_gz export something=1&something=1&something=Example&archive_type=gz blob https __<ip_address>_aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaaa
所以基本上 - 带有服务器的 ip 地址、uuid、一些名称。无论如何,是否可以将其更改为我决定的内容,或者至少更优雅?谢谢!