-
May 12th, 2005, 02:07 AM
#1
HTML Controls - File Field
The property PostedFile.FileName in the control File Field(HTML input controls) is read only. If we want to specify a fixed path, instead the user selects the file - is that possible? If yes how?
In other words, is there any method to upload a file without the user specifying the path for it. We give the path of file in the code.
-
May 12th, 2005, 09:50 AM
#2
Re: HTML Controls - File Field
More than likely no... Browser security is designed such that you don't get to say what's permitted on the client side, only the client computer does. Plus, you can't really know what browser and what OS they would connect from (maybe in your project you can, but not on a typical web app)
What exactly are you trying to do? The best option I can see is to have a user upload a file from a defined directory (ie, where troubleshooting information is, etc.) The only thing you can really do is check the PostedFile and decide if it meets your requirements. It's a good idea to verify the file is what you think it is before doing anything automated with it anyway...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|