I'm currently using the Filefield paths module to assign a specific folder and filename using tokens. Using the local filesystem works perfect, but switching to S3 only uploads the file directly to the bucket. It does not create the folder or use the token filename.

Any plans for integration in the future?

Howie

Comments

JordanMagnuson’s picture

+1. The ability to specify paths definitely seems like it would be useful--or even critical--for a media-driven site.

Shevchuk’s picture

It does not work for me even on local container. Anyone got it working?

jbrown’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

It's not compatible - last time I looked it seemed impossible.

jblumenfeld’s picture

Any updates on this? This would be very helpful for our installation.

Perignon’s picture

Assigned: Unassigned » Perignon
Issue summary: View changes
Status: Active » Closed (won't fix)

No update. The Filefield path module does not use data streams for handling of the files. Storage API uses data streams for handling of files. That means the modules are completely incompatible.

Storage API uses this:
https://api.drupal.org/api/drupal/includes!stream_wrappers.inc/interface...

Filefield path module uses this:
https://api.drupal.org/api/drupal/includes!file.inc/group/file/7

The Storage API uses the stream wrappers because it was the only way to create an agnostic low-level storage system because the File interface will not work on storage such as S3 or Rackspace cloud files or any other cloud storage we may ever take on. The file interface is only for POSIX file systems because it uses PHP's built in file handling functions. We are able to craft CRUD functions with the Stream Wrapper Interface for whatever service/storage we implement.

So unfortunately, unless the Filefield path module wants to rewrite practically all of their code to use the Stream Wrapper Interface (exists in D8 too) then it will never be compatible with Storage API because Storage API cannot use the File interface, whereas the Filefield path module could use the Stream Wrapper Interface (means a lot of work on their part though). Or... Someone writes a submodule for Storage API that replicates the functionality of Fieldfield Path module. Those are the only two options.

Hope that helps explain it a little more.

Marking as Closed (won't fix) because the two modules are incompatible.

Deciphered’s picture

Status: Closed (won't fix) » Fixed

I can confirm that File (Field) Paths 7.x-1.0-rc1 and Storage API 7.x-1.8 do actually play well together; Files in Amazon S3 respect the File (Field) Paths settings.

Perignon’s picture

Thanks for the report!

Status: Fixed » Closed (fixed)

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