Last week's new videos on "Working with files and the File API"
Last Friday we released a set of new videos called "Working with Files and the File API." This group of videos demonstrates some of the basics of working with files, including how to set permissions on files and folders, the difference between managed and unmanaged files in Drupal, plus a few other important bits. We begin an example to demonstrate a cohesive module using most aspects of the File API to create a gallery-style image manager, but without any nodes.
This send ends while we're working through the validation process on an unmanaged file form, and we'll continue this week and the next by building the same gallery system using managed files, and discussing a few additional topics like improving the performance of private files and diving into some stream wrapper code.
Don't let the terminology fool you into thinking this is boring stuff. Knowing how to work with files can be an extremely powerful tool in your developer toolbelt, and when you get done watching this entire series, you'll be able to easily and intelligently know what to do when you have digital assets to gather, move around or protect.
Below is a list of the new videos that were added, enjoy!
- What this video covers and a demo of our node-free image gallery module
- What the difference is between a URI and a URL
- What stream wrappers are and how they work
- How the private file system works
- How file and folder permissions work, and best practices
- How to set up PHP to properly handle file uploading
- How to create a simple form with an unmanaged file input
- How to use a form validation function to validate a file
- How to use hook_file_validate() to validate an uploaded file
- How to use core file validation functions and define your own validator