Solved

Using CFFILE display a progress bar for upload.

Posted on 2006-07-20
3
745 Views
Last Modified: 2013-12-24
I would like to display a progression bar for uploads using coldfusion's cffile. I have the upload working great it's just the fact that larger uploads for the end user become questionable when they are uploaded.

I have seen a few posts that cost money, and a few that weren't very clear. I'm looking for something clear an concise. If someone could please help me out, that would be great.

Here is the basics so far, I have it also set to email me when someone uploads a file with a link to download that specific file.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Upload File</title>
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>

<body><form name="add_file" method="POST" enctype="multipart/form-data">
<table width="500" border="0" align="center">
  <tr>
    <td><input name="Image1" type="file" id="Image1" size="40" default="" /></td>
  </tr>
  <tr>
    <td><span class="littleblack">
      <input type="submit" name="Submit" value="Upload" />
    </span></td>
  </tr>
</table>
<cfif isdefined("form.Image1") AND #FORM.Image1# NEQ "">
            <div align="center">
              <cffile action="upload" filefield="Image1" destination="D:\inetpub\vhosts\XXXXX.com\httpdocs\uploads\" nameconflict="makeunique" accept="image/gif,image/jpeg,image/pjpeg,image/jpg,application/zip,application/msword, application/vnd.ms-excel,application/vns.ms-excel,text/comma-separated-values,application/pdf,application/x-zip-compressed" > 
              <cfset uploadedfile = "D:\inetpub\vhosts\XXXXX.com\httpdocs\images\photo_album\#file.serverfile#">
  <span class="style1"><cfoutput>#file.serverfile# has been successfully uploaded!</cfoutput></span></div>
        <cfmail  
   from="kyle@XXXXX.com"
   username = "kyle@XXXXX.com" password = "XXXXX"
   to="kyle@XXXXX.com"
   server="mail.XXXXX.com"
   port="25"
   subject="#file.serverfile# file has been uploaded to the server">
<cfmailpart type="text">
Files have been uploaded to the server.
</cfmailpart>
<cfmailpart type="html">
<a href="http://www.XXXXX.com/uploads/#file.serverfile#">Download Here</a>
Files have been uploaded to the server.
</cfmailpart>
</cfmail>
</cfif>
</body>
</html>

Thanks for any help.
0
Comment
Question by:kylevn
3 Comments
 
LVL 18

Accepted Solution

by:
Plucka earned 450 total points
ID: 17150717
kylevn,

This is the best one i've found

http://www.asfusion.com/blog/entry/file-upload-with-coldfusion-flash-forms

Regards
Plucka
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …

679 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