[wp-hackers] wordpress doesn't let you host example script files for download
juewang at post.harvard.edu
Tue Mar 23 02:45:03 UTC 2010
I am wondering how to upload and serve script files as downloads on a WP
blog--say, as example code linked to from a blog post. For example, say I
want to provide a file named script.py. The upload dialog blocks the py file
from being uploaded, but I bypassed this by adding a hook to functions.php
to set the mime/type of .py files to text/plain.
However, when trying to download the script, Wordpress seems to block the
url and returns a "sorry, no posts matching that criteria were found"
The above procedure works fine for hosting zip and image files, presumably
because they're not a security hazard.
Should I avoid making script files downloadable ever? I'm not worried about
security since I'm the only user with upload permissions on my blog.
juewang at aaas.org
More information about the wp-hackers