Save content files for each revision

Hello. First of all, I love h5p!!!

Second :-)  In some versions of h5p there is the option: Save content files for each revision
With the note: Disable this feature to save disk space. This value can't be changed if there are existing h5p nodes.

Where is this setting stored in h5p? I would like to set this manually when creating an instance of h5p rather than setting the checkbox in the GUI.

Thanks and keep up the great job everyone at h5p. We all love you!

fnoks's picture

Hi,

Just to be sure: when you are saying new instance of H5P, you are talking about a new H5P Drupal site? The variable is stored using variable_set/get, and you may e.g. use drush:

// Enable revisioning:
drush vset h5p_revisioning 1

// Disable revisioning
drush vset h5p_revisioning 0

Important: You should not change this value on a system already containing H5Ps!

Sorry, I should have qualified. This is for a new h5p wordpress site. I've noticed that in some of my content directories there are many versions of the same video and this is taking up a lot of space. Is there a way to turn off revisioning for wordpress?

icc's picture

Hi, and thank you for the kind words!

This option is only available in Drupal since H5Ps are directly connected to nodes and nodes can have revisions.
In WordPress, there is no revisioning of H5P content.

If you swap out the video used in some content the old video won't be deleted directly, it will be flagged as a tmpfile and then cleaned up/deleted later, after 24 hours by a Cron job.

If you upload the same video to multiple fields or multiple contents there will always be multiple copies of the same file. 

Let me know if you have further questions :-)