Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
lihy committed Jul 18, 2017
1 parent 3937306 commit 51a49a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torcms/handlers/entity_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ def add_pic(self, post_data):
self.redirect('/entity/{0}_m.jpg'.format(sig_save))

@tornado.web.authenticated
def add_pdf(self):
def add_pdf(self, post_data):

img_entiry = self.request.files['file'][0]

img_desc = post_data['desc']
filename = img_entiry["filename"]

qian, hou = os.path.splitext(filename)
Expand All @@ -170,7 +170,7 @@ def add_pdf(self):

sig_save = os.path.join(signature[:2], signature)

MEntity.create_entity(signature, sig_save, kind=2)
MEntity.create_entity(signature, sig_save, img_desc, kind=2)

self.redirect('/entity/{0}{1}'.format(sig_save, hou.lower()))

Expand Down

0 comments on commit 51a49a5

Please sign in to comment.