https://www.mymiller.name/wordpress/programming/storing-a-media-collection/
Storing a Media Collection