Solved

upload file with asp language

Posted on 1998-03-10
2
226 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
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 while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

733 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