Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
674c7f0e
Commit
674c7f0e
authored
Oct 12, 2018
by
kongminhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #1725
some special filename maybe cause error 302 link.
parent
f9377094
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
__init__.py
flask_admin/contrib/fileadmin/__init__.py
+2
-2
No files found.
flask_admin/contrib/fileadmin/__init__.py
View file @
674c7f0e
...
@@ -12,7 +12,7 @@ from werkzeug import secure_filename
...
@@ -12,7 +12,7 @@ from werkzeug import secure_filename
from
wtforms
import
fields
,
validators
from
wtforms
import
fields
,
validators
from
flask_admin
import
form
,
helpers
from
flask_admin
import
form
,
helpers
from
flask_admin._compat
import
urljoin
,
as_unicode
from
flask_admin._compat
import
urljoin
,
as_unicode
,
quote
from
flask_admin.base
import
BaseView
,
expose
from
flask_admin.base
import
BaseView
,
expose
from
flask_admin.actions
import
action
,
ActionsMixin
from
flask_admin.actions
import
action
,
ActionsMixin
from
flask_admin.babel
import
gettext
,
lazy_gettext
from
flask_admin.babel
import
gettext
,
lazy_gettext
...
@@ -944,7 +944,7 @@ class BaseFileAdmin(BaseView, ActionsMixin):
...
@@ -944,7 +944,7 @@ class BaseFileAdmin(BaseView, ActionsMixin):
base_url
=
self
.
get_base_url
()
base_url
=
self
.
get_base_url
()
if
base_url
:
if
base_url
:
base_url
=
urljoin
(
self
.
get_url
(
'.index_view'
),
base_url
)
base_url
=
urljoin
(
self
.
get_url
(
'.index_view'
),
base_url
)
return
redirect
(
urljoin
(
base_url
,
path
))
return
redirect
(
urljoin
(
quote
(
base_url
),
quote
(
path
)
))
return
self
.
storage
.
send_file
(
directory
)
return
self
.
storage
.
send_file
(
directory
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment