Solved

How do I upload a file into another computer

Posted on 2004-08-30
7
233 Views
Last Modified: 2010-04-17
Hi all..
 
    I need to upload a file (.csv/.txt) from my computer to another computer? I have a set of codes here which will upload my files to my local drive. I've tried ammending the "Server.MapPath (uploads)....." codes to the IP address of another computer, however it doesnt work. Is there any way to solve this problem? I glad to accept any advices

My HTML codes (uploadData.asp)
==============================================================================
....................
<form name="uploadData" id="uploadData" method="post" encType="multipart/form-data" action="uploadFile.asp" onSubmit="return validate()">
  <p>
  <input name="File1" type="file" class="tdtext" id="File1">
</p>
  <p>    <br/>
    <input name="Upload" type="submit" class="tdtext" id="Upload" value="Submit" >
    <input name="clear" type="reset" class="tdtext"" id="clear" value="Clear">
.................
==============================================================================


My ASP codes
==============================================================================
<!--#INCLUDE FILE="include/clsUpload.asp"-->
<%


Dim objUpload
Dim strFileName
Dim strPath

' Instantiate Upload Class
Set objUpload = New clsUpload

' Grab the file name
strFileName = objUpload.Fields("File1").FileName

' Compile path to save file to
strPath = Server.MapPath("Uploads") & "\" & strFileName

' Save the binary data to the file system
objUpload("File1").SaveAs strPath

' Release upload object from memory
Set objUpload = Nothing
%>
File has been saved in file system.<BR>
<BR>
View this file:<BR>
<BR>
<A href="Uploads\<%=strFileName%>">Uploads\<%=strFileName%></A>
==============================================================================
0
Comment
Question by:jewel11
  • 3
  • 2
7 Comments
 
LVL 7

Expert Comment

by:suramsureshbabu
ID: 11929250
in ASP while uploading we will be uploading the files to the server only.

to do what you are intending we can do a round about way

map the folder of the other system in your server and then point your asp file to upload the files to that folder.
hope it works and solves your problem
0
 

Author Comment

by:jewel11
ID: 11929286
How do i map the folder of another system in my server and pointing it to my ASP file?
0
 
LVL 5

Expert Comment

by:webtrans
ID: 11929289
what is the error  it gives you exactly
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 7

Accepted Solution

by:
suramsureshbabu earned 50 total points
ID: 11929326
open up network neighbourhood --> open the computer which you want to access --> open the filder which you want to map --> right click and say "map network drive"  --> give it a name
0
 

Author Comment

by:jewel11
ID: 11938151
Hi webtrans

   It does not give me any errors, when i attempt to upload the file into my local drive.. However, the error i got wen i changed the Server.MapPath to Server.MapPath("172.20.30.8/Uploads") & "\" & strFileName.. It gives me the following errors>.

ADODB.Stream (0x800A0BBC)
Write to file failed.

Y izzit so? i've already set the permission for my computer to write into the respective folder.
0
 

Author Comment

by:jewel11
ID: 11938367
To add on:

The codes to be workin using the Server.mapPath ("Uploads"), when i use the IP address of the other computer to upload the file. However when i use my localhost to upload files.. it fails.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Report events not being triggered 8 113
countAbc challenge 9 58
Program to display an alert on Windows Toolbar 2 71
parse convert xml feed to text (python) 2 66
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

932 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

9 Experts available now in Live!

Get 1:1 Help Now