Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Upload and Input Data function from one page

Status
Not open for further replies.

rgilley7

Programmer
Aug 23, 2001
2
US
Is it possible to combine a file upload AND insert data from the same .cfm page?

The files will be uploaded to a seperate directory outside of the MS Access DB that the data will be going to. The MS Access DB will create a link to the uploaded files.

Thanks in advance,
Bob
 
hi bob

As long as you know how to access the directory you're uploading your files to from a web browser, you should be able to perform both a CFFILE and a CFQUERY on the same action page.

Give it a try and let us know if you get stuck. For help on uploading a file try:

...... FORM page

<FORM NAME=&quot;myForm&quot; ACTION=&quot;upload.cfm&quot; METHOD=&quot;post&quot; ENCTYPE=&quot;multipart/form-data&quot;>
<input name=&quot;mypicture&quot; type=&quot;file&quot;>
<input type=&quot;submit&quot; value=&quot; GO &quot;>
</FORM>

...... ACTION page

<CFFILE
ACTION=&quot;Upload&quot;
FILEFIELD=&quot;mypicture&quot;
DESTINATION=&quot;e:\inetpub\ NAMECONFLICT=&quot;MAKEUNIQUE&quot;>

#cffile.serverFile#&quot; is the file you just uploaded
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top