?
Solved

cfcontent networked file

Posted on 2003-03-26
10
Medium Priority
?
352 Views
Last Modified: 2013-12-24
Is it possible to use CFCONTENT (or a similar custom tag) to send a file which is not on the host?
0
Comment
Question by:hanneman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 8209615
CFContent can be used to DOWNLOAD a file
to send a file u'll need to use CFFTP / CFFILE

I guess CFFTP is what ur looking for !

K'Rgds
Anand
0
 
LVL 4

Author Comment

by:hanneman
ID: 8209645
sorry, I meant download. not upload.
0
 
LVL 4

Author Comment

by:hanneman
ID: 8209646
I would like to have the files for download on a seperate machine to the webhost.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 17

Expert Comment

by:anandkp
ID: 8210373
<!--- This is the download file for coldfusion projects --->

<!--- pass the followitn 2 parameters & call this file as a TAG / Include / HREF
<CFSET sPath = "C:\Clients\ProjFolder\anandkp.cfm">
<CFSET sfile = "anandkp.cfm"> --->
 
<CFHEADER NAME="content-disposition" VALUE="attachment; filename=#sfile#">
<!--- file_to_be_download.cfm - Name of file to be downloaded. --->    

<CFCONTENT TYPE="application/octet-stream" FILE="#sPath#" DELETEFILE="FALSE" RESET="TRUE">  
<!--- get teh physical [c:\asdas\asda\asdas.cfm] path for the file to be downloaded. --->

K'Rgds
Anand
0
 
LVL 4

Author Comment

by:hanneman
ID: 8210424
yes but that is for download from the local machine to client.
I am trying to download from a machine that is networked to the webhost, not from the webhost.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 8210462
have u heard abt CFFTP

try this !

<!--- ================================================== CONNECT =============================================== --->

<CFFTP CONNECTION="Anand"
        USERNAME="anonymous"
        PASSWORD="userName@company.com"
        SERVER = "192.168.3.165"
        ACTION="Open"
        STOPONERROR="Yes">

<!--- ========================================================================================================== --->

<CFIF CFFTP.SUCCEEDED>
   
    <!--- *********************************************** FILES ************************************************ --->
    <!--- transfer of the file - Sending on the FTP server --->  
    <CFFTP
      ACTION = "putfile"
      CONNECTION = "Anand"
      LOCALFILE = "I:\akptest\akp.jpg"
      REMOTEFILE = "ftp_akp1.jpg"
      >
     
    <!--- transfer of the file - Picking up from the FTP server --->
    <CFFTP
      ACTION = "getfile"
      CONNECTION = "Anand"
      LOCALFILE = "I:\akptest\akp2.jpg"
      REMOTEFILE = "ftp_akp1.jpg"
      > 
   
    <!--- *********************************************** FOLDER *********************************************** --->
    <!--- Creating DIR on the FTP server --->  
    <CFFTP
      ACTION = "createDir"
      directory = "akp"
      CONNECTION = "Anand"      
      >   
     
    <CFFTP      
      ACTION = "putfile"
      CONNECTION = "Anand"
      LOCALFILE = "I:\akptest\akp.jpg"
      REMOTEFILE = "akp\ftp_akp1.jpg"
      >
     
    <!--- ================================================ CLOSE =============================================== --->
    <CFFTP CONNECTION="Anand"
            ACTION="close"
            STOPONERROR="Yes">
   
</CFIF>
<!--- ========================================================================================================== --->

K'Rgds
Anand
0
 
LVL 4

Author Comment

by:hanneman
ID: 8362137
here is how i solved the problem in the end:

1. share a directory on the file server.
2. create a user login on the network file server.
3. create identical login on the webserver.
4. services >> cold fusion server >> log on as >> change to the newly created login.
5. restart all servers.
5. use unc path name to access the files within the shared directory
<cfcontent file="\\{servername}\{sharename}\{filename}"

thanks for your input anand, i will now ask for refund of points and to put this question into the PAQs as I think it has some value.
-h
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8362313
A request for deletion or PAQ has been made.  If no response or you feel this is in error, comment.  If no objection, myself or another Moderator will handle this question in three days.

Computer101
E-E Admin
0
 
LVL 17

Expert Comment

by:anandkp
ID: 8364922
fine - ur wish !
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8400668
Points refunded and placed in PAQ

Computer101
E-E Admin
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question