Skip to content

falcon.Submit(body=body) Revisited... #204

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

You must be logged in to vote

Hi @bp4151!

Give this a try and let us know what you get back.

Side note: I did not have to make changes to your two methods. (But I did remove the unnecessary header dictionary and tweaked the imports a little.)

import os
import json
from falconpy.sample_uploads import Sample_Uploads
from falconpy.falconx_sandbox import FalconX_Sandbox
from falconpy.oauth2 import OAuth2


def upload_file(token: str, full_file_path: str, is_docker: bool) -> object:
    file_name = full_file_path.split('\\')[-1]

    if is_docker:
        full_file_path = os.path.join(os.getcwd(), "files", file_name)
        if not os.path.exists(full_file_path):
            raise FileNotFoundError

    falcon_sample = S…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bp4151
Comment options

@jshcodes
Comment options

Answer selected by jshcodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Falcon Intelligence Falcon Intelligence issues and questions
2 participants