Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Classic ASP validate form input File type

Explorer ,
Oct 31, 2008 Oct 31, 2008
I need to know how to check if is a value is in the input field of type file in classic ASP. The input field name and id is file, and type is file. The form type is multipart/form-data and name form1.

I am using Upload.asp object by Jacob Gilley to handle my uploading. If the user submits without selecting a file to upload; the site errors out. The user should have the option to submit with or without a file. I need to validate on the server side.

I try
len(Uploader.form("file"))) > 3

Thanks for any help
David Pearson
TOPICS
Server side applications
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 31, 2008 Oct 31, 2008
I found a solution, posting in case somebody else has the same problem.
if ( Uploader.Files.Count > 0 ) then
'do file processing
....
end if

Thanks all
David Pearson
Translate
Explorer ,
Oct 31, 2008 Oct 31, 2008
LATEST
I found a solution, posting in case somebody else has the same problem.
if ( Uploader.Files.Count > 0 ) then
'do file processing
....
end if

Thanks all
David Pearson
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines