|
@@ -3,6 +3,7 @@
|
|
|
import os
|
|
|
import hashlib
|
|
|
import time
|
|
|
+import logging
|
|
|
|
|
|
import boto3
|
|
|
import botocore
|
|
@@ -104,6 +105,7 @@ class VersionManagement(View):
|
|
|
return response.json(500, repr(e))
|
|
|
|
|
|
def upLoadFile(self, request, request_dict, response):
|
|
|
+ LOGGER = logging.getLogger('info')
|
|
|
file = request.FILES.get('file', None)
|
|
|
mci = request_dict.get('mci', '')
|
|
|
lang = request_dict.get('lang', '')
|
|
@@ -165,9 +167,11 @@ class VersionManagement(View):
|
|
|
with open(full_name, 'wb+') as write_file:
|
|
|
for chunk in file.chunks():
|
|
|
write_file.write(chunk)
|
|
|
+ LOGGER.info('上传{}成功'.format(file_name))
|
|
|
return response.json(0)
|
|
|
except Exception as e:
|
|
|
- print(e)
|
|
|
+ LOGGER.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
|
|
|
+ LOGGER.info('上传异常{}'.format(e))
|
|
|
return response.json(500, repr(e))
|
|
|
|
|
|
def editVersionInformation(self, request_dict, response):
|