Skip to content

CreatePut_Files error help #931

Answered by jshcodes
73F0SG1R asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @73F0SG1R -

Try the following code.

from falconpy import APIHarness

falcon = APIHarness(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)

description = input('description of file: ')
name = input('name, with extension, of file: ')
comments_for_audit_log = input('comments for audit log: ')
filename = input('cloud file name: ')
PAYLOAD = {
    "description": description,
    "name": name,
    "comments_for_audit_log": comments_for_audit_log
}
      
with open(name, "rb") as upload_file:
    file_upload = [('file', (filename, upload_file.read(), 'application/octet-stream'))]

response = falcon.command("RTR_CreatePut_Files", data=PAYLOAD, files=file_upload)
print(response)

Thank you for …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@73F0SG1R
Comment options

Answer selected by 73F0SG1R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
RTR Real Time Response issues and questions SDK usage General SDK usage issues and questions
2 participants