Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
vidai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
vidai
Commits
7c3ca262
Commit
7c3ca262
authored
Oct 08, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix avatar display by using url_for to generate correct static URLs
parent
fc67c67d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
utils.py
vidai/utils.py
+2
-1
web.py
vidai/web.py
+0
-6
No files found.
vidai/utils.py
View file @
7c3ca262
...
@@ -19,6 +19,7 @@ Common utilities for Video AI application.
...
@@ -19,6 +19,7 @@ Common utilities for Video AI application.
Includes authentication decorators and helper functions.
Includes authentication decorators and helper functions.
"""
"""
from
flask
import
url_for
from
.auth
import
get_current_user
from
.auth
import
get_current_user
def
get_current_user_session
():
def
get_current_user_session
():
...
@@ -41,7 +42,7 @@ def get_current_user_session():
...
@@ -41,7 +42,7 @@ def get_current_user_session():
user
[
'gravatar_url'
]
=
f
"https://www.gravatar.com/avatar/{email_hash}?s=32&d=404"
user
[
'gravatar_url'
]
=
f
"https://www.gravatar.com/avatar/{email_hash}?s=32&d=404"
# If custom avatar, use that instead
# If custom avatar, use that instead
if
user
.
get
(
'avatar'
):
if
user
.
get
(
'avatar'
):
user
[
'avatar_url'
]
=
f
"/static/avatars/{user['avatar']}?t={int(time.time())}"
user
[
'avatar_url'
]
=
url_for
(
'static'
,
filename
=
f
'avatars/{user["avatar"]}'
)
+
f
'?t={int(time.time())}'
else
:
else
:
user
[
'avatar_url'
]
=
user
[
'gravatar_url'
]
user
[
'avatar_url'
]
=
user
[
'gravatar_url'
]
return
user
return
user
...
...
vidai/web.py
View file @
7c3ca262
...
@@ -1109,12 +1109,6 @@ def delete_avatar():
...
@@ -1109,12 +1109,6 @@ def delete_avatar():
return
redirect
(
url_for
(
'account'
))
return
redirect
(
url_for
(
'account'
))
@
app
.
route
(
'/static/avatars/<filename>'
)
def
serve_avatar
(
filename
):
"""Serve user avatar files."""
return
send_from_directory
(
avatars_dir
,
filename
)
@
app
.
route
(
'/account/change_password'
,
methods
=
[
'POST'
])
@
app
.
route
(
'/account/change_password'
,
methods
=
[
'POST'
])
@
login_required
@
login_required
def
change_password
():
def
change_password
():
...
...
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