go set static resource access directory

How to display a list of files in a directory in this way, similar to ftp display that can be downloaded and viewed:

How is the go web gin framework implemented?

keep watching

Check out the following code implementation:

    //渲染html页面
    // 静态资源加载,本例为css,js以及资源图片
    router.Static("/led", "views/static")
    router.StaticFS("/temp_data", http.Dir("./temp_data"))

Guess you like

Origin blog.csdn.net/u010919083/article/details/129167091
Recommended