saving files to a pc

S

Steve West

How do you save files to a pc using html? I know how to browse and get
files, but do not know how to save them.


Steve
 
D

David Dorward

Steve said:
How do you save files to a pc using html?

You don't. You provide a link to the file and let the user's preferences
decide how that file will be handled.
 
M

Mitja Trampus

Steve said:
How do you save files to a pc using html? I know how to browse and get
files, but do not know how to save them.

Er... you click File -> Save As?
 
S

Steve West

David Dorward said:
You don't. You provide a link to the file and let the user's preferences
decide how that file will be handled.
How do you get the file download box to come up? And how does the pc ask for
and receive the file?

Steve
 
D

Dylan Parry

Using a pointed stick and pebbles, Steve West scraped:
How do you get the file download box to come up? And how does the pc ask for
and receive the file?

1. You make a link (<a href="myfile.ext">download my file</a>)
2. User clicks link
3. Save dialogue pops up, or file opens in browser
 
C

Captain Dondo

Steve said:
How do you get the file download box to come up? And how does the pc ask for
and receive the file?

Steve

google mime filtypes - the server sends the file type; it's up to the PC
to decide what to do with it - i.e. play it if it is a video file,
display it if it is a jpeg, blah, blah, blah. You as the server have no
idea what the client's capabilities are; all you can do is send the file...

Here's what I use to allow a user to print/send/save an image off my server:

<FORM>
<INPUT class="button" NAME="print" TYPE="button" VALUE="Print"
ONCLICK="varitext()">
<input class="button" type=button value="Save"
onclick="JavaScript:document.location.href='http://URLofFileToSave'">
<input class="button" type=button value="Email"
onclick="JavaScript:document.location.href='http://URLofEmailForm'">

<input class="button" type=button value="Close"
onclick="self.close()">
</FORM>
 
H

Hywel Jenkins

google mime filtypes - the server sends the file type; it's up to the PC
to decide what to do with it - i.e. play it if it is a video file,
display it if it is a jpeg, blah, blah, blah. You as the server have no
idea what the client's capabilities are; all you can do is send the file...

Here's what I use to allow a user to print/send/save an image off my server:

<FORM>
<INPUT class="button" NAME="print" TYPE="button" VALUE="Print"
ONCLICK="varitext()">
<input class="button" type=button value="Save"
onclick="JavaScript:document.location.href='http://URLofFileToSave'">
<input class="button" type=button value="Email"
onclick="JavaScript:document.location.href='http://URLofEmailForm'">

<input class="button" type=button value="Close"
onclick="self.close()">
</FORM>

Have you got a URL that shows that in action? I fail to see how
specifying location.href to a JPEG will cause the "Save As" dialog.
 
C

Captain Dondo

Hywel said:
Have you got a URL that shows that in action? I fail to see how
specifying location.href to a JPEG will cause the "Save As" dialog.

Well, yes.... It won't. It calls a php routine which then prods the
browser to do something....

http://www.seiner.com ; click on any of the recent pics and you will get
a popup with mail/save/print options....
 
S

Steve West

">
Well, yes.... It won't. It calls a php routine which then prods the
browser to do something....

What does the php routine do to cause the browser to prompt for saving the
file? I am writing all the server and php code to handle these matters.

Steve
 
B

Benjamin Niemann

Steve said:
">

What does the php routine do to cause the browser to prompt for saving the
file? I am writing all the server and php code to handle these matters.

Steve

Search für 'Content-Disposition' - can't write more now, my daugther is
calling ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top