Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I'd like to add a field on a form on the frontend of my site to allow logged in users to upload audio and video files to a private directory. This would be similar to the standard "youtube upload" button.
I've added the "video" module which I thought would give me this option to add on a form, but it appears to allow upload of a file from the backend, and not front.
I'm redesigning the search input to be more inline to what DrupalOrg has right now where once you click on it, it expands, etc. I personally like that and think it's pretty cool. So I'm trying to add it to my personal website (using my own visual aesthetics, colors, etc.).
My question concerning Drupal 8 however, is this: What might be the best way to use any custom JavaScript that might only pertain to the search form and or the elements that surround it? (Talking about Drupal 8 standards here where JavaScript assets are organized and injected into contexts.)
When I started I had Drupal 8.1.7 installed and tried to update to 8.4.3 but a 500 error. So I restored my site back and update to the next incremental minor Drupal security updates up to 8.3.1 where I notice things were not looking right. My last stable update is 8.2.8 and when updating to 8.3.1 using update.php through the GUI I got a message that referenced serialization and gave me this link https://www.drupal.org/node/2837696.
Ive followed the documentation (!) to define a new field type but generates error below on declaring field for content type. Drupal 8.4/PHP71
Fatal error: Cannot declare class Drupal\nutritioninfo\Plugin\Field\FieldType\nutritioninfoFieldType, because the name is already in use in /home/myhost/public_html/drupal_console/modules/custom/nutritioninfo/src/Plugin/Field/FieldType/nutritioninfoFieldType.php on line 0
I had been using a module called "filebrowser" for implementing the file management system. This provides with a content type "Directory Listing" (listing all the uploaded files) through which a node can be added in which, the users can upload files, view or download them based on configuration set. I had been searching regarding a possible internal document viewer for drupal that would actually help in view