[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference gyro::internet_toolss

Title:Internet Tools
Notice:Report ALL NETSCAPE Problems directly to kdlucas@netscape.com.rnet? Read note 448.L for beginner information.
Moderator:teco.mro.dec.com::tecotoo.mro.dec.com::mayer
Created:Fri Jun 25 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:4714
Total number of notes:40609

2271.0. "FTP with HTML" by VAXSPO::ROGERIO () Thu Jun 29 1995 20:33

T.RTitleUserPersonal
Name
DateLines
2271.1WOTVAX::stus.olo.dec.com::HATTOSIts Simple, but it's not easyFri Jun 30 1995 07:4312
2271.2FTP and NetscapeVAXSPO::ROGERIOWed Jul 05 1995 17:0725
2271.3LGP30::FLEISCHERwithout vision the people perish (DTN 297-5780, MRO2-3/E8)Wed Jul 05 1995 17:3231
2271.4SHIFT-CLICK to saveASABET::buzz.mlo.dec.com::BROOKSChris BrooksWed Jul 05 1995 20:173
2271.5Rep to 2337.2HERON::TIG23::ROUBIONCSC Sophia AntipolisFri Jul 21 1995 15:196
2271.6FTP files with other than .exe extensions??WRKSYS::MACDONALDFri Sep 29 1995 20:1115
2271.7CFSCTC::SMITHTom Smith TAY2-1/L7 dtn 227-3236Sat Sep 30 1995 00:2820
2271.8NCSA server needed access.conf changed alsoHNDYMN::MCCARTHYA Quinn Martin ProductionMon Oct 02 1995 09:1617
2271.9ftp URL WRKSYS::MACDONALDMon Oct 02 1995 16:1814
2271.10CFSCTC::SMITHTom Smith TAY2-1/L7 dtn 227-3236Mon Oct 02 1995 16:298
2271.11URL to do anon ftp and change directory (UCX)XANADU::redear.zko.dec.com::CUMMINGSJerry Cummings, TeamLinksThu Nov 30 1995 14:5219
2271.12probably shouldn't workLGP30::FLEISCHERwithout vision the people perish (DTN 297-5780, MRO2-3/E8)Thu Nov 30 1995 16:4725
2271.13UCX anonymous FTP and WWW do not, currently, play together well, sighUCXAXP::TIBBERTLee Tibbert, DTN 226-6115Thu Nov 30 1995 21:1669
2271.14"Logicals" in FTP?SHOGUN::PAGLIARULOFri May 23 1997 12:3530
    Hi,
    
    I am in the process of writing an internet application that, depending
    on the user's choices, will either download an existing file or create
    one specific to the request which will then be downloaded.
    
    I am using ColdFusion to create the user-specific file. This product 
    allows you formulate a filename from the variables used in your HTML
    environment...
    
    	          <CFFILE  ACTION = "write"   
                             FILE = "C:/files/#cookie.username#.TXT">
    
    When I download the explicit file to the user with an <A HREF FTP: etc>
    notation, everything is fine. The user is presented with the option to
    "SAVE AS".
    
    My problem is trying to download the user-specific file...
    
          <A HREF FTP:C:/files/#cookie.username#.TXT>Download File</A>
    
    It fails with an "object not found" - most likely because FTP doesn't
    understand the #cookie.username# notation. Does FTP have the capability
    to decipher enviromental variables like this - what would the notation
    look like?
    
    
    Thanks!
    
    michele
2271.15teco.mro.dec.com::tecotoo.mro.dec.com::mayerDanny MayerFri May 23 1997 13:1124
	You have two problems:

	1) The # is used in HTML to reference a particular location within an
	   HTML file; and

	2) It's not clear that FTP can support it without extra work.

	You can fix 1) by change references to # with references to "&#35;"
  (without the quotes).  This allows it to be used as is.

	The second problem you need to figure out is if FTP can handle the
  FILE reference.  Have you tried pulling that file specifically with those #'s
  in them?  If that does not work the scheme won't work.

	Also is:

>          <A HREF FTP:C:/files/#cookie.username#.TXT>Download File</A>

  correct?  There should be an equal sign (=) after the HREF and the file
  name should certainly be in double quotes (").

		Danny


2271.16Not quite...SHOGUN::PAGLIARULOFri May 23 1997 14:0228
    Danny,
    
    Thank for responding so quickly...I have been all over the web looking
    for answers too and you are the first!
    
    Yup, the <A HREF> needs an "=", that was my error in the note, the code
    was okay. Also, I didn't realize that the # was part of the HTML
    syntax. In ColdFusion, it is used to offset variables defined in your
    page, so ColdFusion will translate them as it goes. 
    
    The notation is tried in the download was strictly ColdFusion which
    would use '#cookie.username#'.txt to create the file = pagliarulo.txt
    
    Since reading your note, I have tried...
    
       <A HREF=FTP:"&35#cookie.badge&#35.txt">download></A> 
       <A HREF=FTP:"&35#'cookie.badge'&#35.txt">download></A>
       <A HREF=FTP:"cookie.badge.txt">download></A>
    
    All resulting in a bad request. If I right click over the download, I
    get the list of "saving" options but the file listed when I choose
    "save link as" is the html file, not the created file.
    
    Do you think FTP can do the filename translation to pagliarulo.txt? 
    I would really not have to display the text to the screen for the user
    to save...it's so ugly :-P
    
    
2271.17teco.mro.dec.com::tecotoo.mro.dec.com::mayerDanny MayerFri May 23 1997 14:3114
>       <A HREF=FTP:"&35#cookie.badge&#35.txt">download></A> 
>       <A HREF=FTP:"&35#'cookie.badge'&#35.txt">download></A>
>       <A HREF=FTP:"cookie.badge.txt">download></A>

	That should read

       <A HREF="ftp://node.domain.com/&#35;cookie.badge&#35;.txt">download></A>

	at a minimum.  It's important that you follow the URL syntax carefully.
  I didn't include the path since I don't know the path that it's in.  Note
  the placement of the quotes, the # sign and the semicolon.  Note:  use of
  C: in the path is also illegal due to the syntax rules.  Try using C| instead.

		Danny
2271.18Not quite...SHOGUN::PAGLIARULOTue May 27 1997 18:4619
    I have used your notation as described, but it is causing the following
    to happen...
    
     //node.domain.com/dir/the_current_htmlpage#cookie.badge#.txt
    
    so the "translation" of the filename is not taking place, it appers to
    be looking for the reference in the current html document. At this
    point, it is redisplaying the current page - using the back button, I
    see the page twice while the url changes from the bogus translation
    back to the original page.
    
    Since the '#' I included in my origainl note are specific to
    ColdFusion I would think they can be removed and replaced by any
    notation that FTP would understand as a prefix to something that need
    to be "translated". Does FTP only understand explicit filenames?
    
    
    
    
2271.1916.25.0.70::tecotoo.mro.dec.com::mayerDanny MayerTue May 27 1997 21:325
>     Does FTP only understand explicit filenames?

	Yes.

		Danny