Actualmente tengo esto:
Para subirlo:
Código PHP:
<?php
foreach ($_FILES as $fieldName => $file)
{
echo move_uploaded_file($file['tmp_name'], "Catalogo.pdf");
chmod("Catalogo.pdf", 0777);
};
?>
Código PHP:
<?php
$f = "Catalogo.pdf";
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$f\"\n");
$fp=fopen("$f", "r");
fpassthru($fp);
?>