visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
316 experts, 1194 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

ALL :: ZONES :: save as.. different under Windows <-> Mac


By: delphiheaven U.S.A.  Date: 04/02/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
Hello,

I have a small problem. I have a PHP script which allows me to download resized (on the fly) pictures from my website. The file is "convertandsave.php"

When I then right-click on the picture which is shown in the browser, in the save as... dialog automatically appears the name of the picture, for example "xyz123.jpg".

But not under Macintosh..Here appears under save as... the name of the php file, "convertandsave.php".

How can I change this so that also under Mac there appears automatically the name of the picture?
By: RQuadling Date: 04/02/2003 21:07:00 English  Type : Answer
In your script convertandsave.php, make sure you have ...

Header("Content-Disposition: attachment; Filename=xyz123.jpg");

e.g.

Header("Content-Type: audio/mpeg");
Header("Accept-Ranges: bytes");
$filebits = explode("/",$filename);
Header("Content-Disposition: attachment; Filename=" . end($filebits));
$iLength = @readfile($filename);

Richard.
By: VGR Date: 04/02/2003 21:49:00 English  Type : Assist
heuuuuu yes, but with image/jpeg, not audio/mpeg ;-))
By: RQuadling Date: 04/02/2003 21:57:00 English  Type : Comment
Yes.

My code is from my anti-leech script for mp3s only. Sorry about the confusion. But I assumed delphiheaven was already using a header.

Richard.

Do register to be able to answer

EContact
browser fav
page generated in 1354.573010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page