diff --git a/upload_replace.module b/upload_replace.module
index 0489f2d..efe04d8 100644
--- a/upload_replace.module
+++ b/upload_replace.module
@@ -125,4 +125,16 @@ function upload_replace_file_update(&$new_file) {
 function upload_replace_file_delete(&$file) {
   $file->filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $file->fid));
 }
-*/
\ No newline at end of file
+*/
+
+/**
+ * Implements hook_filefield_paths_process_file().
+ *
+ * Adds support for using upload_replace with filefield_paths module.
+ */
+function upload_replace_filefield_paths_process_file($type, $entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as $file) {
+    $file = (object) file_load($file['fid']);
+    upload_replace_file_update($file);
+  }
+}
