Thanks Jason,
I wanted to point this out because I think the extension should handle this for you.
One might want to add quotes, ampersands, ?,<,>,*,etc to the list to be safe as well as the pipe character. Some of those are not allowed on windows either, but it doesn't hurt to be safe.
Accented chars should also be replaced with equivalents.
It would also be nice to optionally replace spaces with dashes. and the suggestion above about having an option to rename the file by a formula like PostImage_[RecordId].jpg
The file I've attached will also strip the accents and other special characters. I use it for generating seo links, but by allowing periods, it will work for this purpose as well. It is from several functions which can be googled and updated a bit for my purposes.
The code to use it would be:
<?php
require_once("generateSafeLink.php");
if(isset($_FILES)) {
foreach($_FILES as $k => $v) {
$_FILES[$k]["name"] = generateSafeLink($_FILES[$k]["name"],array(),false,true);
}
}
?>