Question:

From a "Drupal 8 site builder" perspective, what is the recommended or alternative method(s) to present download files (.pdf format) to the viewing user, which take advantage of Drupal 8's built-in functionality? I prefer to avoid creating basic pages containing download URLs, and presume that functionality such as blocks, fields, and views would easily serve this purpose. But after much research, I'm not sure how to proceed in order to take advantage of Drupal 8 functionality.

(Note that this website also is a Drupal 8 personal development effort on my part.)

Type of website:

A basic "blog" website, with approximately one dozen files available for download to the public. All articles are implemented in the Drupal "article" content type on the "home page."

Environment:

Drupal 8.2.4
Installed on XAMPP development environment.
Windows 10 Pro with latest updates.
Production environment will be shared hosting account with major hosting provider.

Functional Requirements:

Download individual .pdf documents on demand to any user (i.e., authenticated or anonymous) from "download button/control" that may be accessible from multiple locations, such as within articles and from sidebars.

Design Requirements:

Minimize basic page usage; one or zero "basic page" content types is preferred.
Leverage Drupal 8's core functionality; minimize contributed modules.

Any recommendations or suggestions are appreciated.

- Harry

Comments

VM’s picture

I'd create a content type
add a file field

use the above to upload files
use views to generate lists if needed.

Otherwise you can add a file field to any content type or construct an entity via https://www.drupal.org/project/eck

Harry Hobbes’s picture

Thank you VM.

I'll pursue the content type with file field...

sprite’s picture

File module
File Entity module
Optional Entity Construction Kit module
Media entity Audio - to do this with audio files (playable and downloadable)

Setup a content type that includes a file entity field.
It is possible to setup the file entity to use a private file system as well.

Use Views to build lists of files for download.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

Harry Hobbes’s picture

Thank you Sprite. I'm looking into File Entity and its prerequisites as well.

- Harry