473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

link to PSD imgs -- want them to download

I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances

Jul 23 '05 #1
15 4543
Frances Del Rio <fd***@yahoo.com> wrote:
I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances


Just link to them and make sure that your server is sending an
appropriate content-type header.

What happens next is entirely down to how the user's browser is
configured and is out of your control as an author. So don't worry
about it.

Steve

Jul 23 '05 #2

"Frances Del Rio" <fd***@yahoo.com> wrote in message
news:34*************@individual.net...
I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances


There's nothing you can do to make an image download instead of displaying
in the browser if the user's browser is configured to display images of that
type. You can only give the user general instructions as to what he/she
needs to do to start a download: "In most browsers under Windows, you can
right-click the image and select a download option from a pop-up menu" or
something worded perhaps a little better than that. (Some will take issue
with "right-click" as rightie-centric language.)

Jul 23 '05 #3


Harlan Messinger wrote:
"Frances Del Rio" <fd***@yahoo.com> wrote in message
news:34*************@individual.net...
I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances

There's nothing you can do to make an image download instead of displaying
in the browser if the user's browser is configured to display images of that
type. You can only give the user general instructions as to what he/she
needs to do to start a download: "In most browsers under Windows, you can
right-click the image and select a download option from a pop-up menu" or
something worded perhaps a little better than that. (Some will take issue
with "right-click" as rightie-centric language.)


Harlan, thank you for yr response... browswers do not display Photoshop
(.psd) images, this is why I was hoping to find a way for them to
download when user clicks on link to that image (which is what I want
either way, instead of display..) oh well... thanks again.. Frances

Jul 23 '05 #4

"Frances Del Rio" <fd***@yahoo.com> wrote in message
news:34*************@individual.net...

Harlan, thank you for yr response... browswers do not display Photoshop
(.psd) images, this is why I was hoping to find a way for them to
download when user clicks on link to that image (which is what I want
either way, instead of display..) oh well... thanks again.. Frances


If browsers don't display PSDs (and they don't!) then clicking a link to one
*should* cause it to download.

Jul 23 '05 #5
.oO(Frances Del Rio)
Harlan, thank you for yr response... browswers do not display Photoshop
(.psd) images,
You can never be sure about what browsers will do and what not. There's
even a plugin to open zip files directly in the browser ...
this is why I was hoping to find a way for them to
download when user clicks on link to that image (which is what I want
either way, instead of display..)


As already suggested: link to it, send correct content-type. That's it.
If the browser doesn't know how to handle the incoming data it will show
a download dialog.

Micha
Jul 23 '05 #6


Michael Fesser wrote:
.oO(Frances Del Rio)

Harlan, thank you for yr response... browswers do not display Photoshop
(.psd) images,

You can never be sure about what browsers will do and what not. There's
even a plugin to open zip files directly in the browser ...

this is why I was hoping to find a way for them to
download when user clicks on link to that image (which is what I want
either way, instead of display..)

As already suggested: link to it, send correct content-type.


ok, this has be to done server-side, right?? we use java.. so:
response.setContentType("image/psd")?
will this download psd?
(this mans this has to done/processed with a form?)
If the browser doesn't know how to handle the incoming data it will show
a download dialog.


well, right now am getting a 404..
thank you for your help.. Frances

Jul 23 '05 #7
Frances Del Rio wrote:

Michael Fesser wrote:
As already suggested: link to it, send correct content-type.

ok, this has be to done server-side, right?? we use java.. so:
response.setContentType("image/psd")?
will this download psd?
(this mans this has to done/processed with a form?)


No, no--that sets the content type for the page (or other item) being
generated, not for documents (other other items) that the links on the
page point to. He means:

<a href="..." type="image/psd">

Jul 23 '05 #8
Frances Del Rio <fd***@yahoo.com> wrote:
Michael Fesser wrote:

As already suggested: link to it, send correct content-type.
ok, this has be to done server-side, right??


Yes.
we use java.. so:
response.setContentType("image/psd")?
Dont know about the Java syntax. image/psd is one of the values I've
seen used for Photoshop files. I've also seen:
image/photoshop
image/x-photoshop
application/photoshop
application/psd

As there doesn't seem to be a IANA registered value there isn't a
correct value to use.
will this download psd?
Any link will download the PSD. It's what happens after it's
downloaded (displayed by browsers, displayed by another application,
saved to disc, ask the user) that is out of your control.

Using a sensible content-type header just helps the browser do what
the user wants it to do.
(this mans this has to done/processed with a form?)


No.
If the browser doesn't know how to handle the incoming data it will show
a download dialog.


well, right now am getting a 404..


That's a different problem. I'd worry about making sure the link
actually resolves to a file first and then worry about whether a user
will be able to easily save the file later.

Steve

Jul 23 '05 #9
Harlan Messinger <hm*******************@comcast.net> wrote:
Frances Del Rio wrote:
Michael Fesser wrote:
As already suggested: link to it, send correct content-type.
ok, this has be to done server-side, right?? we use java.. so:
response.setContentType("image/psd")?
will this download psd?
(this mans this has to done/processed with a form?)


No, no--that sets the content type for the page (or other item) being
generated,


Good point. If the PSD is a static file on the server then there's
nothing to do in Java. The server itself should be configured to serve
the correct content-type.
It is possible that the entire response is being sent by Java - the
headers and the PSD content.
not for documents (other other items) that the links on the
page point to. He means:

<a href="..." type="image/psd">


I hope he doesn't mean that. The type attribute of links is pooly
supported by browsers and is only advisory, the actual content-type
header from the server is what is being spoken about here.

Steve

Jul 23 '05 #10
Steve Pugh wrote:
Harlan Messinger <hm*******************@comcast.net> wrote:
Frances Del Rio wrote:
Michael Fesser wrote:

As already suggested: link to it, send correct content-type.

ok, this has be to done server-side, right?? we use java.. so:
response.setContentType("image/psd")?
will this download psd?
(this mans this has to done/processed with a form?)


[snip]
page point to. He means:

<a href="..." type="image/psd">

I hope he doesn't mean that. The type attribute of links is pooly
supported by browsers and is only advisory, the actual content-type
header from the server is what is being spoken about here.


I didn't think it was needed, I just thought that's what he meant. I
agree--I never use the type attribute in an A tag myself, and it's the
server that should be configured to send the correct content-type header
for resources like PSDs and so forth.
Jul 23 '05 #11


Steve Pugh wrote:
Frances Del Rio <fd***@yahoo.com> wrote:
Michael Fesser wrote:
As already suggested: link to it, send correct content-type.


ok, this has be to done server-side, right??

Yes.

we use java.. so:
response.setContentType("image/psd")?

Dont know about the Java syntax. image/psd is one of the values I've
seen used for Photoshop files. I've also seen:
image/photoshop
image/x-photoshop
application/photoshop
application/psd


thank you Steve and Harlan for yr responses.. I tried all these (and
also what Harlan suggested..) but still get a 404.. one would think
that if browser can't display it would autom. start downloading (it does
this for Word files, even though in some cases it DOES display word
files (and excel too..) also, when I check syntax in HomeSite it says

"tag 'a' doesn't have an attribute 'type' in currently active versions."

thank you again.. Frances

Jul 23 '05 #12
Frances Del Rio wrote:

thank you Steve and Harlan for yr responses.. I tried all these (and
also what Harlan suggested..) but still get a 404.. one would think
that if browser can't display it would autom. start downloading (it does
this for Word files, even though in some cases it DOES display word
files (and excel too..) also, when I check syntax in HomeSite it says


I overlooked that you had mentioned a 404. If you're getting a 404, it
means the server can't find anything at the URL requested. There isn't
anything there *to* download. No amount of tinkering with content types
and settings can change that! Check the URL and make sure the file is
actually there.
Jul 23 '05 #13
In article <a2********************************@4ax.com>,
Steve Pugh <st***@pugh.net> wrote:
It's what happens after it's
downloaded (displayed by browsers, displayed by another application,
saved to disc, ask the user) that is out of your control.


Actually, Content-Disposition can affect this.

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 23 '05 #14
Henri Sivonen <hs******@iki.fi> wrote:
In article <a2********************************@4ax.com>,
Steve Pugh <st***@pugh.net> wrote:
It's what happens after it's
downloaded (displayed by browsers, displayed by another application,
saved to disc, ask the user) that is out of your control.


Actually, Content-Disposition can affect this.


It can, but user agents are free to ignore it. But yes, often it will
work.

Steve

Jul 23 '05 #15
On Thu, 13 Jan 2005, Henri Sivonen wrote:
In article <a2********************************@4ax.com>,
Steve Pugh <st***@pugh.net> wrote:
It's what happens after it's
downloaded (displayed by browsers, displayed by another application,
saved to disc, ask the user) that is out of your control.


Actually, Content-Disposition can affect this.


It can make proposals, but the traditional RFC warns that this can
have serious security implications, and might be best ignored.

http://www.w3.org/Protocols/rfc2616/...5.html#sec15.5

And so, as you'd expect, the "popular" browser developers went and
implemented it regardless.

Jul 23 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I'm using PHP 4.3 and APACHE2.0. I have a website that requires people to log in before they can download files from my website. A person is logged in if there is a session-variable $logged_in set...
2
by: Manatee | last post by:
Hi group. I had been setting background-images for some page elements, which seemed to load absolutely last, and I was wondering if the pics would appear earlier/faster if I used IMG tags instead....
1
by: Frances Del Rio | last post by:
I have a bunch of Photoshop images on my server, I want when user clicks on a link to a Photoshop img for it to start downloading (like when you click on a Word file..) is there a way to do this...
1
by: Adrian | last post by:
Using: Mysql 5.0.15 php 5.1.6 apache 2.2.3 I am trying to create a download link for various pdfs which I have stored in a mysql DB. I am having trouble with the header fields when clicking...
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
3
by: pd | last post by:
guys, in my web app, i have a simple download button and a href which points to a file on my server, when the user clicks on the button or the link, the file should simply be downloaded to the...
7
by: Jetus | last post by:
I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the "view" link. I don't know how to automate this next...
12
by: Bob Bedford | last post by:
I've to build a website where the customer can buy an image. I'm thinking in the 2 ways to let people get those images: receive them by Email or send them an image link wich validity is limited in...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.