Categories
Posts

pressfs – Read Only Media Support

Last night I tagged version 0.3.0 of pressfs, which includes read only support for media files managed by WordPress. You access these files via the new top level directory: /media. Entries in /media look like:

[sourcecode lang=”text”]
-r——– 1 joseph root 47487 2010-08-03 20:52 boat.jpg
[/sourcecode]

Copying media files is as easy as cp /var/wp/media/boat.jpg /tmp/boat.jpg

To support read only media files I added two new methods to the pressfs WordPress plugin: get_media_list and get_media_file. The new get_media_file method is a bit different in that it does not return JSON, instead it returns the raw data of the file.

There are still some questions about the best way to structure this data for WordPress installs that have a large number of media files. For now I just wanted something functional that people could use.

The source is at https://github.com/josephscott/pressfs or you can download pressfs 0.3.0 as a zip file. A tar.gz of pressfs 0.3.0 is also available.

Leave a Reply

Your email address will not be published. Required fields are marked *