By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,826 Members | 815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,826 IT Pros & Developers. It's quick & easy.

link to PSD imgs -- want them to download

P: n/a
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
Share this Question
Share on Google+
15 Replies


P: n/a
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

P: n/a

"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

P: n/a


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

P: n/a

"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

P: n/a
.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

P: n/a


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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a


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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.