1

I need to store revisions of assets for a plugin I am working on, what is the best / most robust location to store them?

I need the location / files to:

  1. Always be writable.
  2. Not removed when / if craft/storage is cleaned out.
  3. Unaffected by updates or cache being cleared.

S

1

The only thing that Craft guarantees to be writable is craft/storage (and to a limited extent, craft/config).

But, 99% of things in craft/storage can and will be rebuilt as needed depending on the request, even if the entire folder has been nuked.

You can either work within that context, save your assets as blob's in the database (would not recommend) or in your plugin's installation instructions, make sure that you specify they create a craft/plugins/pluginHandle/writable folder you can save your asset revisions to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.