• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 760
  • Last Modified:

Using CFFILE display a progress bar for upload.

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">
<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}

<body><form name="add_file" method="POST" enctype="multipart/form-data">
<table width="500" border="0" align="center">
    <td><input name="Image1" type="file" id="Image1" size="40" default="" /></td>
    <td><span class="littleblack">
      <input type="submit" name="Submit" value="Upload" />
<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>
   username = "kyle@XXXXX.com" password = "XXXXX"
   subject="#file.serverfile# file has been uploaded to the server">
<cfmailpart type="text">
Files have been uploaded to the server.
<cfmailpart type="html">
<a href="http://www.XXXXX.com/uploads/#file.serverfile#">Download Here</a>
Files have been uploaded to the server.

Thanks for any help.
1 Solution

This is the best one i've found


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now