Hi, Is it possible to upload a file to a Prefect F...
# prefect-community
Hi, Is it possible to upload a file to a Prefect Flow, say while initiating a Flow run, either as a parameter or context object, which can then be further read in a task?
Hi @Shyam Meduri - if you're thinking about passing a file in a string/JSON format to your run, that's possible but not particularly encouraged. I'd recommend instead to put your file somewhere your flow can access it (maybe an S3 bucket or somewhere on the local filesystem) and pass a reference to the file location to your flow.
Hi @nicholas Thanks a lot for your advice. I already have the flow setup such that it reads the data from a local file. However, I want to make a provision where each user can supply their own data to the flow run while running the flow. I think the idea of passing the data as a string (in my case a csv) as you mentioned in your first sentence, would be good. I somehow didn't think about it earlier, but will give it a try. On the same topic, I am wondering if there is a way I can let the users provide an auth like password in a separate string which is used by the flow to authenticate. It can be a different string. I thought of using the Flow parameters but then it will be shown to everyone when someone looks at the Flow Runs parameters. I thought about the Secret object in the flow, but that doesn't provide an option in the parameters. I guess the Prefect flow secret concept is based on retrieving from Env variables, while I was looking more for an options of specifying the password/auth as a parameter which should not be shown later or obscured/masked.