Closed (fixed)
Project:
File (Field) Paths
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2011 at 09:54 UTC
Updated:
20 Feb 2012 at 08:20 UTC
after updating from alpha1 to beta1 the file I upload which always has passed ffp directly on the upload, now behaves differently. it upload the file to a path I had set ages ago, which does not appear on the ffp-field configuration, but only in the db in the field_config_instance table in the serialized content of the data column:
(unserialized snippet)
[settings] => Array (
[file_directory] => 'some/old/dir',
...
);
after hook_node_update() the file is being renamed and moved to the right directory I set in the ffp-settings.
the problem is, if I want to use the real path of the file while editing (e.g. Insert ), or access to the file on the hook_node_update() (for extracting a zip) I get the wrong path.
Comments
Comment #1
decipheredI'm not sure if I've read the issue correctly, so forgive me if my answer isn't satisfactory.
File (Field) Paths can't process tokens until the Entity in question is saved, as some of the Entity tokens may not yet be available (title, id, etc), so the files aren't processed and moved until the save. When using modules like insert, the temporary path will be inserted instead of the final destination, however File (Field) Paths will scan through all text fields and replace the temporary path with the processed path when the the Entity is saved.
If this is not working correctly in beta1 try out beta2 or the latest dev release.
Cheers,
Deciphered.