diff --git uuid.admin.inc uuid.admin.inc
index da6c5b5..bd6f27c 100644
--- uuid.admin.inc
+++ uuid.admin.inc
@@ -80,6 +80,23 @@ function uuid_admin() {
     '#description' => t('Should UUIDs be created automatically for comments?'),
   );
 
+  if (module_exists('filefield')) {
+    $form['files'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Files settings'),
+    );
+    $form['files']['uuid_automatic_for_filefield'] = array(
+      '#type' => 'radios',
+      '#title' => t('Automatic UUID generation for filefield  files'),
+      '#default_value' => variable_get('uuid_automatic_for_filefield', FALSE),
+      '#options' => array(
+         TRUE => t('Enabled'),
+         FALSE => t('Disabled'),
+      ),
+      '#description' => t('Should UUIDs be created automatically for filefield uploaded files?'),
+    );
+  }
+
   $form['settings'] = array(
     '#type' => 'fieldset',
     '#title' => t('Synchronization'),
@@ -154,5 +171,13 @@ function uuid_sync() {
     }
   }
 
+  // Files
+  if (variable_get('uuid_automatic_for_files', FALSE)) {
+    $result = db_query("SELECT fid, status FROM {files} files LEFT JOIN {uuid_files} uuid_files ON files.fid = uuid_files.fid WHERE files.status = 1 AND uuid_files.fid IS NULL");
+    while ($item = db_fetch_object($result)) {
+      _uuid_file_insert_uuid($item);
+    }
+  }
+
   drupal_set_message(t("UUID tables have been updated."));
 }
diff --git uuid.install uuid.install
index 8f30488..3aceb22 100644
--- uuid.install
+++ uuid.install
@@ -33,6 +33,7 @@ function uuid_schema() {
     'uuid_vocabulary' => uuid_table_schema('vocabulary', 'vid'),
     'uuid_term_data' => uuid_table_schema('term_data', 'tid'),
     'uuid_comments' => uuid_table_schema('comments', 'cid'),
+    'uuid_files' => uuid_table_schema('files', 'fid'),
   );
   // The uuid_node_revisions table requires an additional column (node id) to
   // support revision deletion upon node delete. No index is needed on this
@@ -183,3 +184,14 @@ function uuid_update_6005() {
 
   return $ret;
 }
+
+/**
+ * Create uuid_files table.
+ */
+function uuid_update_6006() {
+  $ret = array();
+
+  db_create_table($ret, 'uuid_files', uuid_table_schema('files', 'fid'));
+
+  return $ret;
+}
diff --git uuid.module uuid.module
index a035083..cbb9cbc 100644
--- uuid.module
+++ uuid.module
@@ -293,6 +293,60 @@ function uuid_comment(&$a1, $op) {
 }
 
 /**
+ * Implementation of hook_file_insert().
+ *
+ * Support for filefields files.
+ */
+function uuid_file_insert(&$file) {
+  if (!variable_get('uuid_automatic_for_filefield', FALSE)) {
+    return;
+  }
+
+  _uuid_file_insert_uuid($file);
+}
+
+/**
+ * Implementation of hook_file_update().
+ *
+ * Support for filefields files.
+ */
+function uuid_file_update(&$file) {
+  if (!variable_get('uuid_automatic_for_filefield', FALSE)) {
+    return;
+  }
+
+  if (!db_result(db_query("SELECT fid FROM {uuid_files} WHERE fid = %d", $file->fid))) {
+    _uuid_file_insert_uuid($file);
+  }
+}
+
+/**
+ * Implementation of hook_file_delete().
+ *
+ * Support for filefields files.
+ */
+function uuid_file_delete($file) {
+  if (!variable_get('uuid_automatic_for_filefield', FALSE)) {
+    return;
+  }
+
+  db_query("DELETE FROM {uuid_files} WHERE fid = %d", $file->fid);
+}
+
+/**
+ * Insert the uid for a ile.
+ */
+function _uuid_file_insert_uuid(&$file) {
+  if ($file->fid && $file->status) {
+    $uuid = uuid_uuid();
+    db_query("INSERT INTO {uuid_files} (fid, uuid) VALUES (%d, '%s')",
+      $file->fid, $uuid);
+
+    $file->uuid = $uuid;
+  }
+}
+
+/**
  * Determines if a UUID is valid.
  */
 function uuid_is_valid($uuid) {
