You are here

README.txt in File (Field) Paths 6

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
The File (Field) Paths module extends the default functionality of Drupals core
Upload module, the FileField module and many other File Upload modules by adding
the ability to use node tokens in destination paths and filenames.

In simple terms, File (Field) Paths allows you to automatically sort and rename
your uploaded files using token based replacement patterns to maintain a nice
clean filesystem.

File (Field) Paths was written and is maintained by Stuart Clark (deciphered).
- http://stuar.tc/lark

The 6.x-1.x branch is maintained by Robert Allerstorfer (roball) since
2013-05-20.
- http://drupal.org/user/405360


Features
--------

* Configurable file paths now use node tokens instead of user tokens.
* Configurable filenames.
* Support for:
  * Drupal core Upload module.
  * FileField module.
  * ImageField module.
  * ImageField Crop module.
  * Image module.
  * Comment Upload module.
  * Audio module.
* File path and filename cleanup options:
  * Filter out words and punctuation by taking advantage of the Pathauto module.
  * Convert unicode characters into US-ASCII with the Transliteration module.
* Automatically updates unprocessed file paths in the node body on save.
* Retroactive updates - rename and/or move previously uploaded files (Use with
  caution)


Required Modules
----------------

* Token             - http://drupal.org/project/token


Recommended Modules
-------------------

* ImageField Tokens - http://drupal.org/project/imagefield_tokens
* File Aliases      - http://drupal.org/project/file_aliases
* Pathauto          - http://drupal.org/project/pathauto
* Transliteration   - http://drupal.org/project/transliteration


Usage/Configuration
-------------------

Once installed, File (Field) Paths needs to be configured for each file type you
wish to use.

* FileField/ImageField module

  Settings can be found on the fields configuration page in 'Page settings >
  FileField Path settings'.
  http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]/fields/[field-name]


* Upload module

  Settings can be found on the content types configuration page in 'Workflow
  settings > Upload Path settings'.
  http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]


* Image module

  Settings can be found on the Images configuration page in 'Image file settings
  > Image Path settings'.
  http://[www.yoursite.com/path/to/drupal]/admin/settings/image


* Comment Upload module

  Settings can be found on the content types configuration page in 'Comment
  settings > Comment Upload Path settings'.
  http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]


* Audio module

  Settings can be found on the content types configuration page in 'Audio Path
  settings'.
  http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/audio


Frequently Asked Questions
--------------------------

Q. Aren't tokens already supported in the FileField module?

A. Only User tokens are supported in the FileField module.

   Node tokens allow you to use the Node ID, Node Title, Node creation date and
   much more in your directory/filenames where User tokens are very limited.


Q. Why are my files uploaded to 'files/[nid]' instead of 'files/1'?

A. When you are creating or updating a node the full values for the Node tokens
   may not yet be known by Drupal, so the FileField Paths module will upload
   your files to a temporary path based on your filepath pattern ('files/[nid]')
   and then once you save the node and Drupal is provided with the Node tokens
   values the file will be moved to the appropriate location.


Q. Why is there a warning on the 'Retroactive updates' feature?

A. Retroactive updates will go through every single node of the particular
   content type and move and/or rename the files.

   While there have been no reports of errors caused by the feature, it is quite
   possible that the moving/renaming of these files could break links. It is
   strongly advised that you only use this functionality on your developmental
   servers so that you can make sure not to introduce any linking issues.

File

README.txt
View source
  1. The File (Field) Paths module extends the default functionality of Drupals core
  2. Upload module, the FileField module and many other File Upload modules by adding
  3. the ability to use node tokens in destination paths and filenames.
  4. In simple terms, File (Field) Paths allows you to automatically sort and rename
  5. your uploaded files using token based replacement patterns to maintain a nice
  6. clean filesystem.
  7. File (Field) Paths was written and is maintained by Stuart Clark (deciphered).
  8. - http://stuar.tc/lark
  9. The 6.x-1.x branch is maintained by Robert Allerstorfer (roball) since
  10. 2013-05-20.
  11. - http://drupal.org/user/405360
  12. Features
  13. --------
  14. * Configurable file paths now use node tokens instead of user tokens.
  15. * Configurable filenames.
  16. * Support for:
  17. * Drupal core Upload module.
  18. * FileField module.
  19. * ImageField module.
  20. * ImageField Crop module.
  21. * Image module.
  22. * Comment Upload module.
  23. * Audio module.
  24. * File path and filename cleanup options:
  25. * Filter out words and punctuation by taking advantage of the Pathauto module.
  26. * Convert unicode characters into US-ASCII with the Transliteration module.
  27. * Automatically updates unprocessed file paths in the node body on save.
  28. * Retroactive updates - rename and/or move previously uploaded files (Use with
  29. caution)
  30. Required Modules
  31. ----------------
  32. * Token - http://drupal.org/project/token
  33. Recommended Modules
  34. -------------------
  35. * ImageField Tokens - http://drupal.org/project/imagefield_tokens
  36. * File Aliases - http://drupal.org/project/file_aliases
  37. * Pathauto - http://drupal.org/project/pathauto
  38. * Transliteration - http://drupal.org/project/transliteration
  39. Usage/Configuration
  40. -------------------
  41. Once installed, File (Field) Paths needs to be configured for each file type you
  42. wish to use.
  43. * FileField/ImageField module
  44. Settings can be found on the fields configuration page in 'Page settings >
  45. FileField Path settings'.
  46. http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]/fields/[field-name]
  47. * Upload module
  48. Settings can be found on the content types configuration page in 'Workflow
  49. settings > Upload Path settings'.
  50. http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]
  51. * Image module
  52. Settings can be found on the Images configuration page in 'Image file settings
  53. > Image Path settings'.
  54. http://[www.yoursite.com/path/to/drupal]/admin/settings/image
  55. * Comment Upload module
  56. Settings can be found on the content types configuration page in 'Comment
  57. settings > Comment Upload Path settings'.
  58. http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/[node-type]
  59. * Audio module
  60. Settings can be found on the content types configuration page in 'Audio Path
  61. settings'.
  62. http://[www.yoursite.com/path/to/drupal]/admin/content/node-type/audio
  63. Frequently Asked Questions
  64. --------------------------
  65. Q. Aren't tokens already supported in the FileField module?
  66. A. Only User tokens are supported in the FileField module.
  67. Node tokens allow you to use the Node ID, Node Title, Node creation date and
  68. much more in your directory/filenames where User tokens are very limited.
  69. Q. Why are my files uploaded to 'files/[nid]' instead of 'files/1'?
  70. A. When you are creating or updating a node the full values for the Node tokens
  71. may not yet be known by Drupal, so the FileField Paths module will upload
  72. your files to a temporary path based on your filepath pattern ('files/[nid]')
  73. and then once you save the node and Drupal is provided with the Node tokens
  74. values the file will be moved to the appropriate location.
  75. Q. Why is there a warning on the 'Retroactive updates' feature?
  76. A. Retroactive updates will go through every single node of the particular
  77. content type and move and/or rename the files.
  78. While there have been no reports of errors caused by the feature, it is quite
  79. possible that the moving/renaming of these files could break links. It is
  80. strongly advised that you only use this functionality on your developmental
  81. servers so that you can make sure not to introduce any linking issues.