Solved

Using CFFILE display a progress bar for upload.

Posted on 2006-07-20
3
740 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now