Error while attaching in safari

Guys !!
I am having the following error msg while i try to attach files from anything ... like gmail, yahoo or depositpics or for tht any attachment ! the error msg is as follows. please guide me on wat to do. and ... mozilla is working fine with attaching things .. no probs wat so ever ! i was actually trying to upload a pic whn the error occured ... and it happens with anytype of file as well !!!
"Safari can’t open the page “”. The error was: “POSIX error: Invalid argument” (NSPOSIXErrorDomain:22) Please choose Report Bugs to Apple from the Safari menu, note the error number, and describe what you did before you saw this message."

That error usually indicates a corrupted Cache file. If you are using OS X Tiger, go to the Finder: Your User Account>Library>Caches and move the Safari folder to the trash, then restart Safari. If using Leopard, same Caches folder, however, you'll need to move to the trash the file.
Then, restart Safari and try an attachment.