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") }
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") }