Index: src/wp-includes/functions.php
===================================================================
--- src/wp-includes/functions.php	(revision 31308)
+++ src/wp-includes/functions.php	(working copy)
@@ -1901,7 +1901,17 @@
 		}
 	}
 
-	return $filename;
+	/**
+	 * Filter the filename.
+	 *
+	 * @since 4.2.0
+	 *
+	 * @param  array $filename The name of the file. 
+	 * @param  array $ext The file extension.
+	 * @param  array $dir Directory.
+	 * @param  array $filename Unique filename callback.
+	 */
+	return apply_filters( 'wp_unique_filename', $filename, $ext, $dir, $unique_filename_callback );
 }
 
 /**
