Update views.py

sh_branch
车亮亮 9 years ago committed by GitHub
parent 63986ae152
commit 6c204f13f3

@ -216,7 +216,7 @@ def fileupload(request):
fname = u''.join(str(filename))
isimage = len([i for i in imgextensions if fname.find(i) >= 0]) > 0
basepath = os.path.join(r'/var/www/resource/image/' + 'files' if not isimage else'image' + '/',
basepath = os.path.join(r'/var/www/resource/' + 'files' if not isimage else'image' + '/',
timestr)
url = 'https://resource.lylinux.net/{type}/{timestr}/{filename}'.format(
type='files' if not isimage else'image', timestr=timestr, filename=filename)

Loading…
Cancel
Save