Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c1b2e1d0
authored
2013-10-28 23:30:16 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix #238
1 parent
9fc4cd89
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
beego.go
config.go
beego.go
View file @
c1b2e1d
...
...
@@ -5,6 +5,7 @@ import (
"github.com/astaxie/beego/session"
"net/http"
"path"
"strings"
)
const
VERSION
=
"0.9.9"
...
...
@@ -36,6 +37,9 @@ func SetViewsPath(path string) *App {
}
func
SetStaticPath
(
url
string
,
path
string
)
*
App
{
if
!
strings
.
HasPrefix
(
url
,
"/"
)
{
url
=
"/"
+
url
}
StaticDir
[
url
]
=
path
return
BeeApp
}
...
...
config.go
View file @
c1b2e1d
...
...
@@ -8,6 +8,7 @@ import (
"path"
"runtime"
"strconv"
"strings"
)
var
(
...
...
@@ -178,6 +179,12 @@ func ParseConfig() (err error) {
if
serverName
:=
AppConfig
.
String
(
"BeegoServerName"
);
serverName
!=
""
{
BeegoServerName
=
serverName
}
if
sd
:=
AppConfig
.
String
(
"StaticDir"
);
sd
!=
""
{
sds
:=
strings
.
Split
(
sd
,
","
)
for
_
,
v
:=
range
sds
{
StaticDir
[
"/"
+
v
]
=
v
}
}
}
return
nil
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment