Loading file instead of data via canonical


I know that we can import data from csv files via canonicals. I want to know if it is possible to load a file through a canonical and have the platform return me an object with some metadata about the file (where it is stored on S3, file format etc).
I was considering writing a custom transform function to read the file and then upload to s3 via FileSystem apis. But I could not figure out how to read the entire input file (coming in via curl) as base64 string. Is this supported by our platform as of now?


@skandh Please check SourceFile methods that when you sync a file at a location, based on the location its placed it will return you a SourceFile object which has all the information you need about loading a file.