How can I have my Web visitors upload a file from their computer to the Web server without using a component? [Print this FAQ]
Answer:
This is one of the most commonly asked ASP questions. It seems that a lot of people have the need to allow their users to upload files to the Web server and many people have the misconception that you must use a COM component to accomplish this. Granted, the ideal scenario is to use a professional third-party component, such as ASPUpload or SA-FileUp, but you can, indeed, use a component-less approach. Your Web hosting company may already support one (or both) of these popular components.
If they don't and you either won't let you install COM components or you don't feel like paying for an upload component, you can create your an uploading script without using a component...
One way is to use pure ASP code. This code uses the FileSystemObject and some special HTML form tags. For more information on this technique be sure to read: Pure ASP File Upload. This is a very handy article. The author (Jacob Gilley), has encapsulated the complexity of uploading a file from the client to the Web server in a VBScript class. To learn more about VBScript classes, be sure to check out: Using Classes in VBScript.
Another component-less approach to file uploading is to use a Windows Script Component (WSC). These script components are created using your scripting language of choice (usually VBScript or JScript) and can be used on an ASP page without requiring any sort of registration process on the Web server. To see an article on a file upload WSC, check out: A File-Uploading Windows Script Component. To learn more about WSCs, check out: Building Windows Script Components.
FAQ posted by Scott Mitchell at
2/25/2001 4:13:16 AM to the
Uploading category.
This FAQ has been viewed 76,615 times.
Do you have a FAQ you'd like to suggest?
Suggestions? Comments? If so, send it in!
Also, if you'd like to be a FAQ Admin (creating/editing FAQs),
let me know! If you are looking for other FAQs, be
sure to check out the 4Guys
FAQ and Commonly Asked Messageboard Questions!