Fix https issue: Use wp_upload_dir path plus filename, rather than relying on string matching.