Welcome to Dream.In.Code
Getting Help is Easy!

Join 95,475 Programmers for FREE!. Ask your question and get quick answers from Dream.In.Code experts. There are 961 online right now! We're the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert

Register to Make This Box Go Away!


ColdFusion 8 File Upload form & processing

 
Reply to this topicStart new topic

ColdFusion 8 File Upload form & processing, Questions about form building.

parenteau
post 12 Feb, 2008 - 10:12 PM
Post #1


New D.I.C Head

Group Icon
Joined: 12 Feb, 2008
Posts: 28



Dream Kudos: 50
My Contributions


I have tried to do ftp username and passwords for certain folders in my directory. I have a client that wants to be able to distribute online folders with some shared and some private permissions assigned to them... but with each person with one username and password... not different usernames and passwords for the different folder permissions. So, I want to just make upload forms to write to the appropriate directory... I figured if I make the upload sections associated with permissions and the directory viewing associated permissions that would do. I know it seems like a lot of work compared to just assigning different ftp admins to specific directories but the client wants people to only need one username and password.

This is where I am having difficulty...
I can build a form and set the file permissions... but processing these forms I can't figure out what they are missing.... how to direct the file to where I want it to go when the upload/submit button is pushed and then the redirect to the next page command. I have searched google and tutorials extensively... I feel like I am looking in all of the wrong places!!! Does anybody have any suggestions??? I am working on a coldfusion 8 server and have heard that it should be pretty easy with that... but then again I haven't been able to figure it out yet!!!

I thank you in advance for any advice in this...

- Michael


--------------------
User is offlineProfile CardPM

Go to the top of the page


skyhawk133
post 12 Feb, 2008 - 10:19 PM
Post #2


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,102



Thanked 29 times

Dream Kudos: 1600

Expert In: Web Development

My Contributions


Can you show us the code for your form and the upload script.

Thanks.


--------------------
User is offlineProfile CardPM

Go to the top of the page

parenteau
post 12 Feb, 2008 - 10:40 PM
Post #3


New D.I.C Head

Group Icon
Joined: 12 Feb, 2008
Posts: 28



Dream Kudos: 50
My Contributions


QUOTE(skyhawk133 @ 12 Feb, 2008 - 10:19 PM) *

Can you show us the code for your form and the upload script.

Thanks.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
.oneColFixCtr #container {
width: 780px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtr #mainContent {
padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
}
.style4 {font-size: 24pt}
-->
</style></head>

<body class="oneColFixCtr">

<div id="container">
<div id="mainContent">
<div align="center"><span class="style4">Upload Files</span></div><cfform action="upload" method="post" name="form1" class="oneColFixCtr" id="form1">
<div align="center"><table width="500" border="0" align="center" cellpadding="7">
<tr>
<td width="100%" bgcolor="#EEF1F7"><p align="center"><b><font face="Tahoma" size="2">Please make sure that the files you are uploading do <br />
not have the same name as other files you have uploaded!</font></b> </p></td>
</tr>
<tr>
<td width="100%" bgcolor="#E1E6F0"><p align="center"><b><font face="Tahoma" size="2">Upload
Options</font></b></p></td>
</tr>
<tr>
<td width="100%" bgcolor="#EEF1F7"><table border="0" width="100%" cellpadding="4">
<tr>
<td width="34%" align="right" bgcolor="#E1E6F0" valign="top"><font face="Tahoma" size="2"><b>Select
File To Upload:</b></font></td>
<td width="66%" bgcolor="#EAEDF4"><p>
<cfinput type="file" name="file">
<br />
<br />
<cfinput type="submit" name="Submit" value="Submit">
<br />
</p>
</td>
</tr>
</table></td>
</tr>
</table>
</div></cfform>
<p align="center">&nbsp;</p>
<p>
<!-- end #mainContent -->
</p>
</div>
<!-- end #container --></div>
</body>
</html>



--------------------
User is offlineProfile CardPM

Go to the top of the page

parenteau
post 13 Feb, 2008 - 08:38 AM
Post #4


New D.I.C Head

Group Icon
Joined: 12 Feb, 2008
Posts: 28



Dream Kudos: 50
My Contributions


I did that wrong last time... sorry about that. I am trying to upload files to specified directories that have permissions... I don't know how to direct the file though. Can someone help me? Here is the form:

CODE


<div id="container">
  <div id="mainContent">
     <div align="center"><span class="style4">Upload Files</span></div><cfform action="upload" method="post" name="form1" class="oneColFixCtr" id="form1">
      <div align="center"><table width="500" border="0" align="center" cellpadding="7">
        <tr>
          <td width="100%" bgcolor="#EEF1F7"><p align="center"><b><font face="Tahoma" size="2">Please make sure that the files you are uploading do <br />
            not have the same name as other files you have uploaded!</font></b> </p></td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#E1E6F0"><p align="center"><b><font face="Tahoma" size="2">Upload
            Options</font></b></p></td>
        </tr>
        <tr>
          <td width="100%" bgcolor="#EEF1F7"><table border="0" width="100%" cellpadding="4">
              <tr>
                <td width="34%" align="right" bgcolor="#E1E6F0" valign="top"><font face="Tahoma" size="2"><b>Select
                File To Upload:</b></font></td>
                <td width="66%" bgcolor="#EAEDF4"><p>
                  <cfinput type="file" name="file">
                  <br />
                    <br />
                    <cfinput type="submit" name="Submit" value="Submit">
                    <br />
                  </p>
                </td>
              </tr>
          </table></td>
        </tr>
      </table>
      </div></cfform>



--------------------
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 7/5/08 03:40AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month
-->