Is there a way to get the file size of an existing file? Right now, the file object only exposes filename, URL, and ID, but I donβt see any field for file size.
Has anyone found a workaround or method to retrieve the file size programmatically?
we can get the first byte of the file and then extract the total fie size from the headers, this is made more complex by the fact that the header name has a - in it so you have to surround it with back ticks or it will fail.