Static files must be in static bucket on S3 or their size can't be got.

And you need to tell the get_size_of_file function that they're in that bucket, or it gets confused.