How to make sure the filename you want is output to a browser


/ Published in: Perl
Save to your folder(s)

Use this to display a file properly if you are reading it from another location and wish to direct it to the user's browser


Copy this code and paste it in your HTML
  1. print "Content-type: image/jpeg\n";
  2. print "Content-disposition: inline; filename=$file\n\n";
  3. print $content;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.