Need to learn how to work with the Drupal 7 File API? Check out 10 new videos on Build a Module.com, more on the way!

Working with files in Drupal 7 can seem complicated, especially with new the managed / unmanaged system, stream wrappers, and lots of new File API features. This new series of videos aims to demonstrate a clear example of working with files every step of the way, from managing uploads outside of nodes to working with private and public files, using files across different modules and tons more.

Some essential concepts around files are also covered, like the difference between a URI and a URL and how to set up PHP to properly handle uploads.

Today the first 10 videos of the File API series were released at Build a Module.com. Parts 1, 2 and 9 are available to everyone, and the other videos are accessible to subscribers.

Below is a list of shortcuts to each section. Enjoy!

  1. What this video covers and a demo of our node-free image gallery module>
  2. What the difference is between a URI and a URL
  3. What stream wrappers are and how they work
  4. How the private file system works
  5. How file and folder permissions work, and best practices
  6. How to set up PHP to properly handle file uploading
  7. How to create a simple form with an unmanaged file input
  8. How to use a form validation function to validate a file
  9. How to use hook_file_validate() to validate an uploaded file
  10. How to use core file validation functions and define your own validator


Comments

Something's fishy going on with your feed or URLs so be on the lookout. This post was posted three times to the Drupal planet, all with different URLs:

http://drupal.org/aggregator/sources/331
http://chrisshattuck.com/blog/need-learn-how-work-drupal-7-file-api-chec...
http://chrisshattuck.com/blog/need-learn-how-work-drupal-7-file-api-chec... (results in 404)
http://chrisshattuck.com/blog/need-learn-how-work-drupal-7-file-api-chec... (results in 404)

Just keep an eye out for what's going on so this doesn't become a repeat occurrence. Thanks for the great video series!

Hi Dave!

Man, my heart sunk when I saw that on the Planet. Sooo embarrassing. I was hoping there would be a bunch of posts really soon that would bury it fast. Once it's out there, there's no taking it back, you know?

I've tried to figure out what happened, but haven't been able to recreate it. New revisions were getting posted as new nodes, and I'm sure it was something simple but I just haven't got it sorted yet. I'll be treading cautiously before my next Planet post, for sure. ;)

Thanks again, Dave, and looking forward to seeing you in Chicago!

Cheers,
Chris