zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.

Home Page:https://go-zero.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to serve file downloading?

xiaopinghot opened this issue · comments

commented

How can I serve file downloading with go-zero? Like the code below for beego:

func (c *DownloadController) Download() {
	...
	c.Ctx.Output.Download(zipFilePath, "download.zip")	
}

Usually,we just get the file's path and/or access token from the micro service, and use a regular service(eg. nginx) to download file. Because transferring files will cost a lot of bandwidth between micro services.

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.