You are here

README.txt in Download 8.2

Same filename and directory in other branches
  1. 7.2 README.txt
  2. 7 README.txt
This module can compress any files attached to a node and provides a 
download link.

Drupal 8 port sponsored by Origin Eight (www.origineight.net)
with dev by greenmachine and ckng

Installation 
------------

1) Install PclZip library

To use this module you have to have the PclZip library
installed by Composer. You can accomplish this either by configuring
Drupal composer or using the Composer Manager extension. See information here:
https://www.drupal.org/docs/8/extending-drupal/installing-modules-composer-dependencies

2) Place the download folder in the modules directory of your site and
enable it on the `Extend` page.

3) Have at least one entity type that includes at least one file field

4) Add a new Download Link field to that entity type, and select the file fields
that should be included.


Migration from D7
-----------------
A migrate plugin can be found in src/Plugin/migrate/process for an example migration 
scenario from a field in D7 to D8. You will need to modify this file if you want to
use it for your own migration. The example scenario uses these fields:

Drupal 8 Target field : field_download_link
Drupal 7 Source field : download_field

You'll also need to modify this line in the plugin:

$fields = array('field_resourcefiles', 'field_spanish_files', 'field_representative_image');

Replace those array items with the names of the file fields on your contnet type.

Here is the example migrate configuration YML for the example scenario:

process:
  field_download_link:
    plugin: download_field
    source: field_download
    process:
      label: label
      fields: fields

File

README.txt
View source
  1. This module can compress any files attached to a node and provides a
  2. download link.
  3. Drupal 8 port sponsored by Origin Eight (www.origineight.net)
  4. with dev by greenmachine and ckng
  5. Installation
  6. ------------
  7. 1) Install PclZip library
  8. To use this module you have to have the PclZip library
  9. installed by Composer. You can accomplish this either by configuring
  10. Drupal composer or using the Composer Manager extension. See information here:
  11. https://www.drupal.org/docs/8/extending-drupal/installing-modules-composer-dependencies
  12. 2) Place the download folder in the modules directory of your site and
  13. enable it on the `Extend` page.
  14. 3) Have at least one entity type that includes at least one file field
  15. 4) Add a new Download Link field to that entity type, and select the file fields
  16. that should be included.
  17. Migration from D7
  18. -----------------
  19. A migrate plugin can be found in src/Plugin/migrate/process for an example migration
  20. scenario from a field in D7 to D8. You will need to modify this file if you want to
  21. use it for your own migration. The example scenario uses these fields:
  22. Drupal 8 Target field : field_download_link
  23. Drupal 7 Source field : download_field
  24. You'll also need to modify this line in the plugin:
  25. $fields = array('field_resourcefiles', 'field_spanish_files', 'field_representative_image');
  26. Replace those array items with the names of the file fields on your contnet type.
  27. Here is the example migrate configuration YML for the example scenario:
  28. process:
  29. field_download_link:
  30. plugin: download_field
  31. source: field_download
  32. process:
  33. label: label
  34. fields: fields