Welcome, Guest
Username: Password: Remember me

TOPIC: encoding problems with uploads

encoding problems with uploads 3 years 3 months ago #64686

  • mattias
  • mattias's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 77
  • Karma: 1
I need to download files from the upload / surveys / files, but these are encoded, I have the following code to force a download

$f=$_GET;
$partes_ruta = pathinfo("/upload/surveys/46443/files/$f");
//echo $partes_ruta;
header('Content-Description: File Transfer');
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$f\"\n");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
$archivo= $f.".".$partes_ruta;
//$fp=fopen("$f", "r");
$fp=fopen($archivo, "r");
fpassthru($fp);


pantalla_2011-08-16.jpg


regards
The administrator has disabled public write access.

Re: encoding problems with uploads 3 years 3 months ago #64689

  • c_schmitz
  • c_schmitz's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 819
  • Thank you received: 116
  • Karma: 93
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.102 seconds
Donation Image