Solved

Using CFFILE display a progress bar for upload.

Posted on 2006-07-20
3
750 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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