When using Features, exported field definitions capture the URI scheme. The 2.x branch has a nifty fix for this, leveraging hook_field_default_field_bases_alter(). I'll post a patch shortly that adapts this for s3fs.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ergonlogic’s picture

Status: Active » Needs review
FileSize
979 bytes

And here's the patch.

coredumperror’s picture

Could you go into more detail on why this is helpful? I'm not really grasping what this patch actually allows one to do.

ergonlogic’s picture

When you export field definitions to Features, it captures the URI, most likely public://. This hook overrides these field base definitions to allow transparent use of s3:// instead, without having to update all your Features. It also has the nice result of making any images bundled with Features via uuid_features upload to S3 when reverting the feature.

To activate this effect, it's sufficient to drop a single line in your settings.php:

$conf['s3fs_file_uri_scheme_override'] = 's3';

This allows for local development using the public:// scheme, and production deployment to s3://.

coredumperror’s picture

Status: Needs review » Fixed

Ah, OK. Sounds useful. I'll go ahead and add your patch.

  • coredumperror committed 5d8d81a on 7.x-2.x
    Issue #2495559: Added a new hook to make integration with Features...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.