Skip to main content
Participating Frequently
May 19, 2023
Question

Progress bar to show the status of file upload to ftp server

  • May 19, 2023
  • 1 reply
  • 1110 views

Hi,

I am trying to upload file to ftp server with CFFTP tag. the code that i am using is:

<cfset variables.uploadedFileServerName = "TestUploadFile" & "/" & "#fileName#" />
<!---<cfset fileName =  uploadResult.serverfile/>--->
 
<cfftp connection="session.ftpConn"
action="open"
server="uploaduat.flexnetoperations.com"
username="some user"
password="password"
stoponerror="Yes"
timeout="90000">
Did it open connection? <cfoutput>#cfftp.succeeded#</cfoutput><br />
<cfif cfftp.succeeded>
 
<cfftp connection = "session.ftpConn"
action = "PutFile"
localFile="#form.FileContents#"
remoteFile="#variables.uploadedFileServerName#"
stoponerror="Yes"
passive = "Yes"
timeout="90000">
<P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
<cfif CFFTP.Succeeded>
<P>Close the connection:
<CFFTP ACTION="close"
CONNECTION="session.ftpConn"
STOPONERROR="Yes">
<P>Did it succeed? <CFOUTPUT>#CFFTP.Succeeded#</CFOUTPUT>
<cfset form.FileContents = ""/>
<cfset fileId = URL.fileId/>
<script type="text/javascript" language="JavaScript">
    <cfoutput>
 
Is there a way to show the progressbar to show the progress of file upload to ftp server to the user? 
 
Thanks in advance
    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    May 22, 2023

    You know roughly how long the process is supposed to take: max 90 000 seconds. So you could use cfprogressbar.

    Participating Frequently
    May 23, 2023

    Hi @BKBK  thanks for replying. but the issue is the progressbar should show the progress of uploading the files, there would be some smaller files it would take much less time to upload. so basically it should show the upload of the file.

    BKBK
    Community Expert
    Community Expert
    May 24, 2023

    What is your ColdFusion version and update level?

     

    As far as I know, ColdFusion no longer has custom progress-bars for simultaneous file-uploads. Such tools, based on Javascript and Flash, have been deprecated. You will have to build your own.

     

    Search the web for possibilities. When you find one that meets your needs, return to the forum and we can look into it together. That's the only suggestion I can think of at the moment.