using a trick found in ifilter(). Feel free to backport to 2.5.
Attach a file by drag & drop or click to upload