That will NOT do you any good.  You will have a string containing the file path 
of the uploaded file as it existed on the client system (a bit scary that).  
But you can't do anything with it.  The server can not, no how, no way access 
files directly on the client machine.  It does not happen, and you do not want 
it to happen, or just imagine the hacking nightmares that could be inflicted on 
the surfing public.


The SERVER is the SERVER and the CLIENT is the CLIENT and never shall the twain 
intertwine.  

CFDirectory and CFFile are for manipulating files accessible to the server.  If 
you dissect what happened when using CFFile action=upload.  The Client's 
browser read a file, encoded it and sent it to the web server, the web server 
wrote that file to a temp directory.  The CFFile tag then reads the file from 
the temp directory and does what you request to do with it on the server.  It 
is not reading the file from the client.

If you want clients to be able to upload batches of files, check into FTP 
solutions.  There are many and they can be integrated into CF applications in 
interesting ways.


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

....-----Original Message-----
....From: Rick Faircloth [mailto:[EMAIL PROTECTED]
....Sent: Wednesday, March 09, 2005 3:24 PM
....To: CF-Talk
....Subject: RE: How to Browse and Choose Directory...
....
....Interesting...thanks, Rebecca.
....
....So, they would pick the first file, then I would use the path
....of that file to upload the other files in their directory?
....
....Rick
....
....
....-----Original Message-----
....From: Rebecca Wells [mailto:[EMAIL PROTECTED]
....Sent: Wednesday, March 09, 2005 4:52 PM
....To: CF-Talk
....Subject: Re: How to Browse and Choose Directory...
....
....
....Here's a little javascript majick to do the trick. Create a little
....javascript like this:
....<InvalidTag type="text/javascript">
....function getFile(f) {
....f.directory.value = f.uploadFile.value;
....}
....</script>
....
....Then in the body of the page, your form is like this:
....
....<form action="" method="post" enctype="multipart/form-data"
....name="uploadForm">
....Browse to your file directory (pick a file): <input type="file"
....name="uploadFile" size="35" onblur="getFile(this.form);"><br>
....<input type="hidden" name="directory">
....<input type="submit" value="submit">
....</form>
....
....When the form is submitted, it will pass the full path of the file that
....was
....selected. Then you can use the CF function Get DirectoryFromPath(path) to
....get just the directory path you want to use.
....HTH.
....
....
....
....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198081
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to