Esempio n. 1
0
func (this *SiteIconController) Get() {
	localfile := "fis/img/favicon.ico"

	if !com.PathExist(localfile) {
		utils.GetImage(beego.AppConfig.String("logo"), localfile)
	}

	data, _ := utils.ReadFileByte(localfile)

	this.Ctx.Output.Body(data)
	this.Ctx.Output.ContentType("image/x-icon")
}
Esempio n. 2
0
func (this *LogoController) Get() {
	localfile := "tmp/logo.png"

	if !com.PathExist(localfile) {
		utils.GetImage(beego.AppConfig.String("logo"), localfile)
	}

	data, _ := utils.ReadFileByte(localfile)

	this.Ctx.Output.Body(data)
	this.Ctx.Output.ContentType("image/png")

}