I'm uploading a file to a server then I store the original file name in a database.
Now for downloading I am currently using something like this:
Content-Disposition: attachment; filename=<?=urlencode($file)?>
It works but it replaces space characters with +
How can I restore the original filename when downloading?