Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > saving files to a pc

Reply
Thread Tools

saving files to a pc

 
 
Steve West
Guest
Posts: n/a
 
      08-19-2005
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



 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      08-19-2005
Steve West wrote:

> 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.


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Mitja Trampus
Guest
Posts: n/a
 
      08-19-2005
Steve West wrote:
> 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?
 
Reply With Quote
 
Steve West
Guest
Posts: n/a
 
      08-19-2005

"David Dorward" <(E-Mail Removed)> wrote in message
news:de55tm$ll8$1$(E-Mail Removed)...
> Steve West wrote:
>
>> 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.
>

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

Steve


 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      08-19-2005
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

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
 
Reply With Quote
 
Captain Dondo
Guest
Posts: n/a
 
      08-19-2005
Steve West wrote:
> "David Dorward" <(E-Mail Removed)> wrote in message
> news:de55tm$ll8$1$(E-Mail Removed)...
>
>>Steve West wrote:
>>
>>
>>>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.
>>

>
> 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>
 
Reply With Quote
 
Hywel Jenkins
Guest
Posts: n/a
 
      08-23-2005
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
> Steve West wrote:
> > "David Dorward" <(E-Mail Removed)> wrote in message
> > news:de55tm$ll8$1$(E-Mail Removed)...
> >
> >>Steve West wrote:
> >>
> >>
> >>>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.
> >>

> >
> > 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>


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.

--
Hywel
http://kibo.org.uk/
 
Reply With Quote
 
Captain Dondo
Guest
Posts: n/a
 
      08-23-2005
Hywel Jenkins wrote:
> In article <(E-Mail Removed)>, (E-Mail Removed)
> says...
>
>>Steve West wrote:
>>
>>>"David Dorward" <(E-Mail Removed)> wrote in message
>>>news:de55tm$ll8$1$(E-Mail Removed).. .
>>>
>>>
>>>>Steve West wrote:
>>>>
>>>>
>>>>
>>>>>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.
>>>>
>>>
>>>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>

>
>
> 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....
 
Reply With Quote
 
Steve West
Guest
Posts: n/a
 
      08-24-2005
">
> 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


 
Reply With Quote
 
Benjamin Niemann
Guest
Posts: n/a
 
      08-24-2005
Steve West wrote:

> ">
>> 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


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

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
saving flash files from cache dir? Tom Firefox 4 01-07-2009 11:39 AM
Saving MP3 files to CD as MP3 files Mighty Magpie Computer Information 3 04-07-2008 03:50 PM
EXCEL question saving a file saving the the first column as read only Luis Esteban Valencia ASP .Net 0 01-06-2005 07:02 PM
Saving DataTable to session vs saving a Custom object. John Kandell ASP .Net 4 12-10-2004 05:08 AM
Saving Images While Saving ASP Pages ! Lovely Angel For You ASP General 1 10-03-2003 12:03 AM



Advertisments