+CONTRACT_LENSMAN_CONTRIBUTION_OPERATOR_ID = 'yDCp3UU055m70lUx6jaTk1RVkiVkKenJ'
CONTRACT_LENSMAN_CONTRIBUTION_TEMPLATE_ID = 'yDCp3UU05rgksnUXtZsEvdrK1tRGb7ax'
-CONTRACT_LENSMAN_CONTRIBUTION_OPERATOR_ID = 'yDCp3UU055m70lUx6jaTk1RVkiVkKenJ'
+CONTRACT_LENSMAN_CONTRIBUTION_SECRET_ID = 'AKIDAHh3WzlYvHqOoR69MI94329FIGEDA62x'
+CONTRACT_LENSMAN_CONTRIBUTION_SECRET_KEY = 'tieio5Rn7PqARmJzcAcAh4gNE3rowEc3'
+CONTRACT_LENSMAN_CONTRIBUTION_CALLBACK_SECRET_ID = 'F0C875BC8B9442AE8E4769155F812EC0'
+CONTRACT_LENSMAN_CONTRIBUTION_CALLBACK_SECRET_KEY = '645CD7B0067B4FCEB6A9A6D589EC9DD6'
@@ -0,0 +1,291 @@ |
||
1 |
+# -*- coding: utf-8 -*- |
|
2 |
+ |
|
3 |
+import json |
|
4 |
+ |
|
5 |
+from django.conf import settings |
|
6 |
+from tencentcloud.common import credential |
|
7 |
+from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException |
|
8 |
+from tencentcloud.common.profile.client_profile import ClientProfile |
|
9 |
+from tencentcloud.common.profile.http_profile import HttpProfile |
|
10 |
+from tencentcloud.ess.v20201111 import ess_client, models |
|
11 |
+from TimeConvert import TimeConvert as tc |
|
12 |
+ |
|
13 |
+ |
|
14 |
+tencentcloud_cfg = settings.TENCENTCLOUD.get('ess', {}) |
|
15 |
+operator_id = tencentcloud_cfg.get('operator_id') |
|
16 |
+template_id = tencentcloud_cfg.get('template_id') |
|
17 |
+secret_id = tencentcloud_cfg.get('secret_id') |
|
18 |
+secret_key = tencentcloud_cfg.get('secret_key') |
|
19 |
+callback_secret_id = tencentcloud_cfg.get('callback_secret_id') |
|
20 |
+callback_secret_key = tencentcloud_cfg.get('callback_secret_key') |
|
21 |
+endpoint = tencentcloud_cfg.get('endpoint') |
|
22 |
+file_endpoint = tencentcloud_cfg.get('file_endpoint') |
|
23 |
+ |
|
24 |
+ |
|
25 |
+def test_upload_document_files(files, file_type='png'): |
|
26 |
+ files = [ |
|
27 |
+ { |