kataras on v12.2.0-beta2
kataras on master
Release version 12.2.0-beta2 (compare)
kataras on master
Release version 12.2.0-beta2 (compare)
kataras on master
setup_examples_test.bash permis… (compare)
kataras on master
README: minor (compare)
kataras on master
fix #1882 (compare)
kataras on master
Method Configuration.GetLogLeve… Merge pull request #1883 from q… (compare)
kataras on master
we've reached 193 sponsors! tha… (compare)
kataras on master
minor (compare)
kataras on master
add some api helpers (compare)
kataras on master
upgrade dependencies (compare)
kataras on master
include iris version, build tim… (compare)
kataras on master
fix #1877 (compare)
kataras on master
fix #1876 (compare)
kataras on master
add '{date}' dynamic path param… (compare)
kataras on master
we've got 182 sponors, thank yo… (compare)
kataras on master
add OmitErrorHandler on rest Op… (compare)
@focusonline you can downgrade, just change the @v12-alpha
to @v12.1.8
however this is not recommended, if you have troubles using v12-alpha
there is the @master
branch which contains fixes over the 3 months old alpha version.
If you have issues please open a github ticket so I and others can provide assistance.
go: github.com/kataras/iris/v12@v12.2.0-alpha requires
gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776/go.mod: verifying module: gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776/go.mod: cannot authenticate record data in server response
. Any idea how to sort the issue?
Hi folks, I am getting the following error running iris -
go: github.com/kataras/iris/v12@v12.2.0-alpha requires gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776/go.mod: verifying module: gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776/go.mod: cannot authenticate record data in server response
. Any idea how to sort the issue?
^ Fixed by zapping the current GOPATH, looks like a local issue with go mod.
go clean --modcache
? If so, maybe we should add it to the installation's troubleshooting section.
Hi, @kataras when I use "Upload files", I found
app.Post("/upload", func(ctx iris.Context) {
...
.......
file, _, err:= ctx.FormFile("file")
if err != nil {
ctx.StopWithError(iris.StatusBadRequest, err)
return
}
// Upload the file to specific destination.
//the file does not have Filename property,
dest := filepath.Join("./uploads", file.Filename)
ctx.SaveFormFile(file, dest)
ctx.Writef("File: %s uploaded!", file.Filename)
})
the file does not have Filename property(use go1.15 version!),but the method ctx.FormFile("file") return result:fileHeader have the Filename property.So the document have some problem!
So the correct code is:
app.Post("/upload", func(ctx iris.Context) {
// Set a lower memory limit for multipart forms (default is 32 MiB)
ctx.SetMaxRequestBodySize(maxSize)
// OR
// app.Use(iris.LimitRequestBodySize(maxSize))
// OR
// OR iris.WithPostMaxMemory(maxSize)
// single file
file, fileHeader, err:= ctx.FormFile("file")
if err != nil {
ctx.StopWithError(iris.StatusBadRequest, err)
return
}
// 这个地方应该使用fileHeader来获取文件名(go 1.15version).
//我不知道是不是go的版本的问题,我没有去查看go之前的版本
dest := filepath.Join("./uploads", fileHeader.Filename)
ctx.SaveFormFile(file, dest)
ctx.Writef("File: %s uploaded!", file.Filename)
})
and the ctx.FormFile source code is:
func (ctx *Context) FormFile(key string) (multipart.File, *multipart.FileHeader, error) {
// we don't have access to see if the request is body stream
// and then the ParseMultipartForm can be useless
// here but do it in order to apply the post limit,
// the internal request.FormFile will not do it if that's filled
// and it's not a stream body.
if err := ctx.request.ParseMultipartForm(ctx.app.ConfigurationReadOnly().GetPostMaxMemory()); err != nil {
return nil, nil, err
}
return ctx.request.FormFile(key)
}