3 Replies - 7191 Views - Last Post: 13 February 2008 - 08:38 AM Rate Topic: -----

#1 parenteau  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 12-February 08

ColdFusion 8 File Upload form & processing

Posted 12 February 2008 - 10:12 PM

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

Is This A Good Question/Topic? 0
  • +

Replies To: ColdFusion 8 File Upload form & processing

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1877
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: ColdFusion 8 File Upload form & processing

Posted 12 February 2008 - 10:19 PM

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

Thanks.
Was This Post Helpful? 0
  • +
  • -

#3 parenteau  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 12-February 08

Re: ColdFusion 8 File Upload form & processing

Posted 12 February 2008 - 10:40 PM

View Postskyhawk133, on 12 Feb, 2008 - 10:19 PM, said:

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>
Was This Post Helpful? 0
  • +
  • -

#4 parenteau  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 12-February 08

Re: ColdFusion 8 File Upload form & processing

Posted 13 February 2008 - 08:38 AM

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:


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



Was This Post Helpful? 0
  • +
  • -

Page 1 of 1