I am making a site for a business that has different files for each machine that they sell. For instance, one machine someone buys may be calibrated a little different than the next persons machine, so they would have two different files. Each file is labeled with the serial number of the machine it goes with. I was wondering if there was a way to create a .php file and have it put up a search form and make the form search the directory the files are located in for the serial number that someone would enter, and give back a link to download the file once it was found.
I already know how to make a custom module and put a block in it and have the block appear, I just need to know what to put in that block for this to work, or if this is even possible.
I would gladly appreciate any help I could get on this topic!

Comments

VM’s picture

Personally:
I'd generate a custom content type with pertinent information in it and a download of the file.
I'd create a view with exposed filters to allow a user narrowed search.

However, you can port https://www.drupal.org/project/search_files to Drupal 8