예제 #1
0
func buildUploadHandler(host string) http.Handler {
	backend := mongofs.New(host, "media", "fs")
	uploadHandler := UploadHandler(backend)
	return jwtware.New(
		groupware.New(groupware.DefaultOptions(
			uploadHandler)))
}
예제 #2
0
func buildDownloadHandler(host string) http.Handler {
	backend := mongofs.New(host, "media", "fs")
	return jwtware.New(http.FileServer(backend))
}