1234567891011121314151617181920212223242526 |
- def upload_api_call_exec(file_id,file_name,user_id,extension):
- """ This function calls the Rest API to upload the file_id and other attributes to DynamoDB
- Parameters
- file_id : string
- The file_id which need to be created in DynamoDB.
- file_name : string
- The file_name corresponding to the file_id
- user_id : string
- The user_id corresponding to the file_id
- extension : string
- The extension of the file
- """
- try:
- apiService_obj = ApiService()
- content_api_call = apiService_obj.content_to_api_call(file_id, file_name, user_id, extension)
- print("The content api-call is",content_api_call)
- response_post_api_call = apiService_obj.post_api_call(content_api_call,cf.constants['post_back_url'])
- print("Reached here 4")
- print("The response_post_api call is",response_post_api_call)
- return response_post_api_call
- except:
- print("Failure in calling API")
- return "failure"
|