Solved

upload file with asp language

Posted on 1998-03-10
2
222 Views
Last Modified: 2013-12-25
how can i do to upload a file from a client using
asp language ?

0
Comment
Question by:ocorrea
2 Comments
 

Accepted Solution

by:
amit_gupta earned 100 total points
ID: 1832145
Hello,

1) ASP itself has got nothing (or very little) to do with uploading files from the client. It is just a server-side scripting technology (part of Microsoft's Active SERVER Platform).

2) How to upload files depends on which browsers you are catering to:

If you are using a Netscape or Microsoft-IE4 browser, you can use the FORM INPUT tag with TYPE=FILE. Doing this places an element on an HTML form letting the user supply a file as input. When the form is submitted, the content of the specified file is sent to the server along with the other form data. The ACTION tag of your form may point to an ASP file, which will read the uploaded file (request.form("myfile")) and write it to a file on the server (using the Microsoft FileSystem Object which comes with ASP).

For a demo visit www.geocities.com, click JOIN (top right icon) to become a member, click MEMBERS, click FILE MANAGER - login and then click "EZ Upload" to see how they upload files using the <INPUT TYPE="file" NAME="my....."> form element.

If you are using IE3.x, the only way is to use "Microsoft File Upload Control". This is part of Microsoft's Web Posting Acceptor, which can be downloaded at http://www.microsoft.com/windows/software/webpost/post_accept.htm

You will have to install the web-posting acceptor on your IIS... this will install files named UPLOADX.ASP in the SCRIPTS directory under INETPUB... this will demostrate how to upload files...

This activex control (and its corresponding server-side acceptor) has to be used for IE3 because it does not support the TYPE=FILE option for INPUT elements. Microsoft has posted an update for this at http://www.microsoft.com/ie/download/ie3add.htm, but i havent really tested it...

Happy uploading.

Amit Gupta

0
 

Author Comment

by:ocorrea
ID: 1832146
The tip was very interesting about type=file but the main problem is how can i put the file from the client to the server.

As a matter of fact when i'm triying to write a file with the filesystem object utility this only read and write at the server side but how should i do to read a client disk from the web whit ASP language .

i don't know if i'm being clear , but the main question is how can i read a lient disk ( file ) with asp and how can i write or send this file to the server .
Because i have a lot of experience with asp , im have worked with filesystem object for several times .
Can you explain me better of this topic ???

for example :
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.txt", True)a.WriteLine("This is a test.")
a.Close

this is the way about fileystemobject so ????
what should i do ??

Thank for your comments .....
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now