473,624 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copy File from Desktop to Server

Hello!

Sending email attachments works only if the file is on the server file system.

So, I need to copy the local file to the server.

Is there an easy way of doing this?

Thank you!

-Bahman
Nov 19 '05 #1
2 1978
Hi Bahman,

Since this newsgroup is about ASP.NET, I assume you are asking to perform
the copy through a web interface.

You can add an HTMLInput tag in your HTML or ASPX page to allow the site
visitor to select a file from their desktop to be uploaded to the server.
For an example look at this link
http://www.webswapp.com/demos/htmlinputfile.aspx

BTW, you cannot automate the selection of the file from the server side code
because of the browser security constraints (imagine how much damage could
happen if the web programming model were to allow a webpage that you visit on
the World Wide Web to automatically upload files from your desktop to the
server)

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Bahman" wrote:
Hello!

Sending email attachments works only if the file is on the server file system.

So, I need to copy the local file to the server.

Is there an easy way of doing this?

Thank you!

-Bahman

Nov 19 '05 #2
Philip,

Outstanding. Thank you very much!

-Bahman

"Phillip Williams" wrote:
Hi Bahman,

Since this newsgroup is about ASP.NET, I assume you are asking to perform
the copy through a web interface.

You can add an HTMLInput tag in your HTML or ASPX page to allow the site
visitor to select a file from their desktop to be uploaded to the server.
For an example look at this link
http://www.webswapp.com/demos/htmlinputfile.aspx

BTW, you cannot automate the selection of the file from the server side code
because of the browser security constraints (imagine how much damage could
happen if the web programming model were to allow a webpage that you visit on
the World Wide Web to automatically upload files from your desktop to the
server)

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Bahman" wrote:
Hello!

Sending email attachments works only if the file is on the server file system.

So, I need to copy the local file to the server.

Is there an easy way of doing this?

Thank you!

-Bahman

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1343
by: h | last post by:
I have literally spent DAYS experimenting, searching, researching RTFM'g; and I STILL can NOT get copy() to work. If I wrote this message the way I've been talking - there'd be an "F" word sprinkled between almost every word. I'll spare you that - you can insert them yourself... :) Apparently I must be the ONLY person that wants to upload a KNOWN file from a KNOWN path WITHOUT using a form.
3
9409
by: EC | last post by:
I am trying to save a file to an end users desktop from the Server on the click of a button. This works when run the application on my local but does not work when the application is running on the web server because Dim copyfiletodesktop As String = "C:\temp\" points to the Web server’s C drive and not the end users C while when I run the application on my desktop, C points to my C Drive and that is why it works. Does anyone know how...
2
1206
by: Mitchell Thomas | last post by:
How do i create an icon on a users desktop that when double-clicked automatcially goes out and copies a .mdb file from the server and replaces the users .mdb file on their local drive. I know there is some sort of dos file i can create, but dont know the syntax, also what do i put in the startup in the icon properties? thankx,
11
6616
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to transfer data across.On the serve I am using Socket 2 API (recv function to read bytes)and not using ..NET. I use FileStream to open the file on the pocket pc, then associate a BinaryReader object with the stream and call ReadBytes to read all the...
2
3295
by: Selden McCabe | last post by:
I have a desktop application which communicates with a web server, using a web service. Mostly, the web service reads and writes data to Access databases on the web server. Now, I need to copy a large (1 MB to 30 MB) MDB file from the desktop to the web server, replacing an existing file on the server. What is the best way to do this from within a VB.Net windows program?
4
7023
by: Jon Asher | last post by:
Hi, I'm trying to do a simple import of a comma delimited text file with COPY but it's returning an error. The file has been granted all permissions in Linux, so it's not clear to me what the problem is. Version 7.41 is installed... see below for details: A comma delimited text file has been placed in a local directory with permissions set to allow any user to read or write to it: /root/Desktop/server_transfer/WorldPoints_v2.txt'
2
3009
by: deepaks85 | last post by:
Hello everyone, I am trying to copy a file with filesystemobject but I don't know where I am doing mistake. Please help me out.... Here is the code............. file.htm
25
2872
by: Andy_Khosravi | last post by:
I just recently changed my database that I'm running from a monolithic DB to a split FE/BE. The front end resides on the client machine and the BE resides on a network drive. I'm experimenting with a utility developed by Tony Toews to handle the distribution and subsequent updates of the software. I'm having some trouble with the overall upgrade process I've implemented, and I'm hoping one of you may have an idea how to go about fixing...
3
1822
by: sasimca007 | last post by:
Hi friends, I have one small doubt that is, i have to copy one file from tmp folder to the desktop. This is a modperl program, when i write linux command in that modperl program it is recognising tmp folder but it is not recognising the desktop folder. When i run that program in the browser it is telling the error like permission denied. My code is below: package practice::filecopy; sub handler { $r=`cp...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.