Solved

How do I upload a file into another computer

Posted on 2004-08-30
7
235 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

789 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