Copy link to clipboard
Copied
Hi,
I am trying to upload file to ftp server with CFFTP tag. the code that i am using is:
Copy link to clipboard
Copied
You know roughly how long the process is supposed to take: max 90 000 seconds. So you could use cfprogressbar.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi @BKBK , I can show the progress bar and send bytes thorugh java script with this code:
Copy link to clipboard
Copied
I don't quite understand the link you're making between upload and FTP . The one is <cffile action="upload"> via a form, whereas the other is <cfftp action="putFile">.
I expected the FTP progressbar to do something like:
Copy link to clipboard
Copied
Something else. A thought just occurred to me.
Do I understand correctly that the process involves <cffile action="upload">, followed by <cfftp action="putFile">? If so, why?
Why not just <cffile action="upload">?
Copy link to clipboard
Copied
Hi @BKBK the process involves
Copy link to clipboard
Copied
The Javascript you shared seems to be for file upload, not for FTP.
In any case, assuming you have access to the servers, why don't you just use <cffile action="upload">?
Copy link to clipboard
Copied
Hi @BKBK , not sure how we can put fto files through <cffile action="upload">. How can we give server details , username, password for the ftp server in this tag ?
Copy link to clipboard
Copied
Hi @Akash299451589siy ,
I am not recommending the one process or the other, at least not yet. I'm just trying to understand your scenario and the result you want.
As I said earlier, I cannot see how we can use the above "Upload" Javascript as FTP progress-bar. What I would do is to look for code that is better suited to FTP. Either front-end (e.g. Javascript) or back-end (e.g. Java or CFML).
It could also be that I am missing the point. If so, I would be grateful if you could correct me.
Copy link to clipboard
Copied
I thought this thread mentioned using CFFTP to move very large files, maybe videos? I don't see that in here though, so maybe I'm getting threads confused. Just to warn you, CF is not good at that because it's designed for a completely different purpose: running web applications. To do that effectively, CF creates a thread pool at startup, and can't increase or decrease that number as it runs. If you set this to, for example, five, it will create five threads in the pool and if you have more than five requests it'll queue those until there's a free thread. Normally, you might not notice this because those threads will quickly do their work and take the next requests from the queue. But if you have a long-running request - like you might easily get with CFFTP - it'll keep that thread until it's done and the queue will just get larger and larger. So anyway, that's a thing.
As for monitoring the time a CFFTP request takes, there's nothing built into CF to do that for you. You can't find out within CF how much of a specific CFFTP operation has been completed, as far as I know. If I'm right about this, you'd have to do your ftp from a different language that can report bytes sent, and invoke that ftp program from within CF.
Dave Watts, Eidolon LLC