##// END OF EJS Templates
v2.9.2 :: Uncomment 'upload_multiple_files_advance' function
eynilupu -
r16:39b05cc1efce
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -319,21 +319,19 class JROAPI():
319 resource_extend.append(value2)
319 resource_extend.append(value2)
320
320
321 print('BLOCK N°{} :: "{}" file(s) found >> uploading'.format(count1 + 1, len(block)))
321 print('BLOCK N°{} :: "{}" file(s) found >> uploading'.format(count1 + 1, len(block)))
322 print(resource_extend)
322 try:
323 print(files_dict)
323 result = self.ckan.call_action(
324 #try:
324 'package_revise',
325 # result = self.ckan.call_action(
325 {'match': '{'+ str(package_id_or_name) +'}', 'update__resources__extend': json.dumps(resource_extend)},
326 # 'package_revise',
326 files=files_dict
327 # {'match': '{'+ str(package_id_or_name) +'}', 'update__resources__extend': json.dumps(resource_extend)},
327 )
328 # files=files_dict
328 print('BLOCK N°{} :: Uploaded file(s) successfully'.format(count1 + 1))
329 # )
329 if len(blocks) == count1 + 1:
330 # print('BLOCK N°{} :: Uploaded file(s) successfully'.format(count1 + 1))
330 return result
331 # if len(blocks) == count1 + 1:
331 except:
332 # return result
332 print('ERROR :: Use the "print" for more information')
333 #except:
333 _, exc_value, _ = sys.exc_info()
334 # print('ERROR :: Use the "print" for more information')
334 return exc_value
335 # _, exc_value, _ = sys.exc_info()
336 # return exc_value
337 else:
335 else:
338 return "ERROR:: No file(s) found to upload"
336 return "ERROR:: No file(s) found to upload"
339
337
General Comments 0
You need to be logged in to leave comments. Login now