File Field Control

  • Thread starter Thread starter Anne
  • Start date Start date
A

Anne

hie all, i have dragged a File Field control from the HTML
tab to my page and i am able to browse and retrieve the
file i want. the only problem i have is, i do not want my
users to be able to browse to other folders. i want them
to be able to just browse at the specific folder only. in
other words, i just want them to be able to view at the
specific folder when the browser button is clicked. i have
tried looking in the properties, but found no way to do
so. is it possible to acheive what i want to do? is it is,
how can i do it? thanx!
 
I believe you can use javascript to access the filename property of the File
Upload form field. You could then do some sort of form validation that
would prevent the form from being submitted if the path of the file to
upload wasn't in the directory you were expecting. This would still let
them browse any folder, but they could only upload from a valid folder.

However, this may not be possible anymore due to some security issues that
involved the file upload control and javascript, modern browsers might have
disabled the ability to script that control. However, I haven't checked
into it so I'm not sure.

Ryan Gregg
 
Back
Top