Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Upload File History

No security coverage Under active development 18 sites

This module provides a way to manage file uploads and replacements, allowing users to maintain a history of files and easily switch between them. It's particularly useful for managing large data files where errors in processing could be risky, as it validates new files before they become active and allows for easy rollbacks to previous versions.

File_history are a form api element (and a file field wigdet in the 2.x branch)

Ok... what else ?

The main feature of file history are permitting to maintain a "memory" or a collection of "non-used" files and provide an easy switch between them.

A use case ?

The main use case of this field are providing data from processing files. A contributor want to expose an amount of data so huge that the "manual contribution" are not a workable solution.
But, such an amount of data, make the upload and replacement of file for processing a little risky.
File_history permit, by the upload validations from file module, a validation of the new file during upload. After upload, and save of form/entity, the new file is only "load" but not activ. The new file become active only after selection. If after all, data aren't corrects, the old file remain on the field. A simple click on "select/unselect" buttons permit the rollback.

Branches

1.x : The legacy One

The form element propose more customisations than the widget.
The "no_upload", "no_use", "no_download" items in one hand and "create_missing" items in the other hand permit you to create a list of non-drupal generated files (like logs of operations). You can manage donwload, delete there files, maintaining a little history of the operations

2.x : CCK compatibility

- A file field widget based on the form API element
- A "test module" (test_file_history) are present with a preconfigured node type and a test form ( /admin/file_history/exemple_form ).
- The cleaning of the "managing file directly in folder" mecanics, now totaly based on core - file API

3.x : Drupal 10/11 ready

That is the 2.x branch port to Drupal 10/11.
Why a new branch ? because some of Drupal service has changed...

More ?

Documentation ?

Read more in the full documentation

1.x to 2.x/3.x migration

The module ensures backwards compatibility.
For this, it is necessary to add an attribute '#legacy' => TRUE, on the "file_history" form element.

 $form['configurations_files'] = [
      '#type' => 'file_history',
       [...]
      '#legacy' => TRUE,
      '#create_missing' => TRUE,
Drupal 10–11

Ask your assistant about Upload File History

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • file Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Apr 2023
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.2 Stable 10–11 Aug 24, 2026
3.0.1 Stable 10 Apr 12, 2023
3.0.0 Stable 10 Apr 5, 2023