浏览代码

버그 수정

2DU 8 年之前
父节点
当前提交
1bf0f44c72
共有 2 个文件被更改,包括 13 次插入18 次删除
  1. 1 1
      func.py
  2. 12 17
      views/upload.tpl

+ 1 - 1
func.py

@@ -163,7 +163,7 @@ def acl_check(ip, name):
     conn = pymysql.connect(user = set_data['user'], password = set_data['pw'], charset = 'utf8mb4', db = set_data['db'])
     conn = pymysql.connect(user = set_data['user'], password = set_data['pw'], charset = 'utf8mb4', db = set_data['db'])
     curs = conn.cursor(pymysql.cursors.DictCursor)
     curs = conn.cursor(pymysql.cursors.DictCursor)
 
 
-    m = re.search("^사용자:(.*)", name)
+    m = re.search("^사용자:([^/]*)", name)
     n = re.search("^파일:(.*)", name)
     n = re.search("^파일:(.*)", name)
     if(m):
     if(m):
         g = m.groups()
         g = m.groups()

+ 12 - 17
views/upload.tpl

@@ -11,20 +11,15 @@
 <h1 class="title">
 <h1 class="title">
     {{title}}
     {{title}}
 </h1>
 </h1>
-<div>
-    <form action="/upload" method="POST" enctype="multipart/form-data">
-        <input type="file" name="file" accept=".jpg, .jpeg, .png, .gif, .JPG, .JPEG, .PNG, .GIF">
-        <br>
-        <br>
-        파일명 : <input type="text" name="data">
-        <br>
-        <br>
-        라이선스 : <input type="text" name="lice">
-        <br>
-        <br>
-        <button class="btn btn-primary" type="submit">업로드</button>
-        <br>
-        <br>
-        <span>{{number}}MB 이하 파일만 업로드 가능하고 확장자는 jpg, png, gif, jpeg만 가능합니다.</span>
-    </form>
-</div>
+<form id="usrform" action="/upload" method="POST">
+    <input class="form-control input-sm" type="file" name="file"> <button class="btn btn-primary" type="submit">업로드</button>
+    <br>
+    <br>
+    파일명 : <input class="form-control input-sm" type="text" name="data">
+    <br>
+    <br>
+    라이선스 : <input class="form-control input-sm" type="text" name="lice">
+    <br>
+    <br>
+    <span>{{number}}MB 이하 파일만 업로드 가능하고 확장자는 jpg, png, gif, jpeg만 가능합니다.</span>
+</form>