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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide folders/files from CFDirectory listing.

Status
Not open for further replies.

Pugman

MIS
Aug 24, 2001
27
US
Hi,

I'm hoping someone can help with this one. I have a file management script for uploading/downloading/viewing files. I'd like to be able to "hide" certain folders (i.e. _vti_cnf, images) and certain files (i.e. *.cfm, *.asp), while allowing uploading and display of all file types. This is because I never know what type of file the customer is going to upload.

I know CFDIRECTORY has a FILTER option which would be great if all I ever got were Word .doc files for example.

Please help...I'm really stuck on this.

pugman
 
Use CFFILE with the Upload action to upload a file specified in a form field to a directory on the Web server.

Syntax
<CFFILE ACTION=&quot;Upload&quot;
FILEFIELD=&quot;formfield&quot;
DESTINATION=&quot;full_path_name&quot;
NAMECONFLICT=&quot;behavior&quot;
ACCEPT=&quot;mime_type/file_type&quot;
MODE=&quot;permission&quot;
ATTRIBUTES=&quot;file_attributes&quot;>



ACCEPT:
This is optional attribute, but it is used to limit what types of files will be accepted. Enter one or more MIME types, each separated by comma, of the file types you want to accept. For example, to allow uploads of GIF and Microsoft Word files, enter:

ACCEPT=&quot;image/gif, application/msword&quot;

Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top