After the end of the
Func UploadFiles (c * gin in the Context) {
The Println (c.a. ccepted)
Path:=c.P aram (" path ")
Path=config. DefaultDir + path
The form, err:=c. ultipartForm ()
if err ! Nil={
SAN Antonio SON (400, gin. H {
"Message" : err, Error (),
})
Return
}
If the form==nil {
Return
}
Files:=form. The File (" File ")
For _, file:=range files {
The Println (file. The Filename)
//upload a file to the specified directory
Err:=c.s. aveUploadedFile (file, the file path +. Filename)
if err ! Nil={
SAN Antonio SON (400, gin. H {
"Message" : err, Error (),
})
The continue
}
}
SAN Antonio SON (200, gin. H {
"Message" : "the Upload Success,"
})
}