The patch over at #2176589: AWS PHP SDK v2 support will work, but only if you put the bucket name in the file field configuration as the subdirectory. The default bucket name is ignored.

I think we need to be able to specify a bucket to use, and then treat directories as being all within the selected bucket. The AWS SDK supports pseudo directories, but also will try and create buckets for top-level folders. This won't work for deployments where the AWS account can't create buckets.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deviantintegral’s picture

Status: Active » Needs review
FileSize
8.37 KB

This patch:

  • Adds support for bucket configuration per-field. This means that each file or image field can use the default site-wide bucket, or their own specific bucket.
  • Creates pseudo-folders as needed for fields. This way, you can have an 'images' bucket, with tokenized folders for each image from the file entity.
deviantintegral’s picture

Status: Needs review » Fixed
FileSize
25.09 KB

I'm about to merge the attached patch which:

  • Fixes using the global bucket config instead of the one associated with the URL.
  • Uses a URL class instead of a string. Yay, less parsing!
  • Adds some PHPUnit tests!

Status: Fixed » Closed (fixed)

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