File Field Archive module

Events happening in the community are now at Drupal community events on www.drupal.org.
greg.harvey's picture

Hi all,

This is to fulfill a fairly urgent client need, so if I don't get feedback in the next 12 hours or so I'm going to build this anyway, but whether I release it or not depends on feedback here. I can't find anything like it, but if anyone can think of a smarter way to achieve this with existing contrib, let me know. Here's what my client needs:

  1. "Archived" in this context means moved to another physical location to free disk space
  2. We want the ability to specify either a date or a time period after which files in a specific file field should be archived
  3. We want to specify a directory the files should be moved to
  4. We want to specify whether or not those files should still be available to view, even though they are moved (e.g. sometimes they might be moved to slower media, but you still want them available - other times they should be "disappeared" completely - depends on site policy)

I was going to achieve this with a module extending the options on the File Field settings form for each file field.

Thoughts?

Comments

Check out the rules module

nadavoid's picture

Check out the rules module too. I think you can use it to schedule events to happen. If it doesn't do exactly what you need, it would probably provide the foundation you need.

Good idea

greg.harvey's picture

I'm pretty sure there's nothing like this, because that was my first thought, but I could create it as a Rule - only thing is I'm not sure where a good place for the "still show these files" flag would be, in that instance? The setting would belong to the field, so it would be a bit counter-intuitive to bury it in Rules.

Maybe I could write the archiving bit as a rule option (field[s] is there, as is date probably - the "extra" would be a "move file" action I think) and write a bit of UI code that effectively creates a rule dynamically for a given file field from the file field settings form? That way the options are on the file field you're referring to but Rules does the heavy lifting and advanced users can write more advanced archiving rules in the Rules UI if they wish. And the decision to still show the files or not can just be a system variable exposed on the file field settings form and nothing to do with Rules.

How does that sound?

Contributed Module Ideas

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: