Solved

Using CFFILE display a progress bar for upload.

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

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

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

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

18 Experts available now in Live!

Get 1:1 Help Now