Sunday, February 3, 2002

David Davies asked me earlier today, how to get the path to a local file, given the URL for its upstreamed and rendered version. Here’s a code-snippet that does it:

That will work fine for an image file, but if you need the path to a rendered file. If you need to convert an .html url back to the correct filepath. Add this extra step:

radio.file.locateFileIgnoringExtension (f, @f);