forked from science-ation/science-ation
Fix document downloader with spaces in the filenames (put quotes around the filename in the http headers)
This commit is contained in:
parent
8ea2823bf1
commit
f6fcb2d728
@ -28,7 +28,7 @@
|
||||
if($r=mysql_fetch_object($q))
|
||||
{
|
||||
header("Content-type: ".trim(exec("file -bi ../data/documents/$r->filename")));
|
||||
header("Content-disposition: inline; filename=$r->filename");
|
||||
header("Content-disposition: inline; filename=\"".$r->filename."\"");
|
||||
header("Content-length: ".filesize("../data/documents/$r->filename"));
|
||||
readfile("../data/documents/$r->filename");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user