cxv
This commit is contained in:
parent
c4e41923f9
commit
de660f7bc6
2 changed files with 10 additions and 4 deletions
|
@ -638,8 +638,12 @@ def settings_images_profile(v):
|
|||
|
||||
if not imageurl: abort(400)
|
||||
|
||||
if v.highres and '/images/' in v.highres : os.remove('/images/' + v.highres.split('/images/')[1])
|
||||
if v.profileurl and '/images/' in v.profileurl : os.remove('/images/' + v.profileurl.split('/images/')[1])
|
||||
if v.highres and '/images/' in v.highres:
|
||||
fpath = '/images/' + v.highres.split('/images/')[1]
|
||||
if path.isfile(fpath): os.remove(fpath)
|
||||
if v.profileurl and '/images/' in v.profileurl:
|
||||
fpath = '/images/' + v.profileurl.split('/images/')[1]
|
||||
if path.isfile(fpath): os.remove(fpath)
|
||||
v.highres = highres
|
||||
v.profileurl = imageurl
|
||||
g.db.add(v)
|
||||
|
@ -666,7 +670,9 @@ def settings_images_banner(v):
|
|||
bannerurl = process_image(name)
|
||||
|
||||
if bannerurl:
|
||||
if v.bannerurl and '/images/' in v.bannerurl : os.remove('/images/' + v.bannerurl.split('/images/')[1])
|
||||
if v.bannerurl and '/images/' in v.bannerurl:
|
||||
fpath = '/images/' + v.bannerurl.split('/images/')[1]
|
||||
if path.isfile(fpath): os.remove(fpath)
|
||||
v.bannerurl = bannerurl
|
||||
g.db.add(v)
|
||||
g.db.commit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue