Index: link-template.php
===================================================================
--- link-template.php	(revision 19227)
+++ link-template.php	(working copy)
@@ -2052,6 +2052,27 @@
 }
 
 /**
+ * Retrieve the url to the upload directory.
+ *
+ * @package WordPress
+ * @since 3.3.0
+ *
+ * @param string $path Optional. Path relative to the upload url.
+ * @return string Upload url link with optional path appended.
+*/
+function upload_url($path = '') {
+	$upload_dir = wp_upload_dir();
+	$url = $upload_dir['baseurl'];
+	if ( 0 === strpos($url, 'http') && is_ssl() )
+		$url = str_replace( 'http://', 'https://', $url );
+
+	if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
+		$url .= '/' . ltrim($path, '/');
+
+	return apply_filters('upload_url', $url, $path);
+}
+
+/**
  * Retrieve the site url for the current network.
  *
  * Returns the site url with the appropriate protocol, 'https' if
