function get_attached_file($file, $attachment_id)
{
if (file_exists($file) || !($s3object = $this->is_attachment_served_by_s3($attachment_id))) {
return $file;
}
$url = $this->get_attachment_url($attachment_id);
// return the URL by default
$file = apply_filters('as3cf_get_attached_file', $url, $file, $attachment_id, $s3object);
return $file;
}