Return parameters from a File Resource object

Hi,

How do I access the parameters of a FileResource object? Specifically, I would like to return the source and filename. Below is a screenshot of what I’m trying to access, within the params.

image

Thanks

Hi Charlie,

Please have a look at the FileResource; you can obtain the file (type File) and filename as properties:

resource = ...  # FileResource

filename = resource.filename 

file = resource.file  # File object
file_content = file.getvalue()