I'm trying to use get_attached_file() in my new plugin to find out the complete path of an uploaded file based on its ID.
But get_attached_file seems to only return the base URL of uploads, instead of the complete path to the actual file on installations that are using the "organize uploads by year and month" option.
i.e. get_attached_file() is telling me that the file with ID 1 is located in /home/user/wordpress/wp-content/upload/ instead of where it actually happens to be, which is /home/user/wordpress/wp-content/upload/2008/04/
Anybody recognize this problem? Or have another solution for me?