473,395 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Multiple File Upload W/ One <input type=file> control

Axe
Here's the problem: I've got an ASP.NET (C#) web page that has a single
<input type=file> control on it for uploading a file. The way the code
works is that the uploaded file is then parsed for the path and file name.
I then save the posted file to a temporary directory on the web server (for
later processing). I then open up a file stream and stream reader and read
a related file into a string that is in the posted file's same directory
(and has the same filename; just a different file type).

This works great and wonderful when I test it on my development machine and
my test machine. However, when I test it remotely, the posted file's path
is relative the user's local machine. When the web server attempts to find
that related file it fails because it doesn't have the same path as the
user's local machine.

Am I confusing anyone as much as I'm confused?

Bottom line, we can't have two input controls for the upload process. I
need to get to that second file. How? I know the local path but the web
server can't deal with that can it?

Thanks for your help.
Nov 15 '05 #1
1 10831
"Axe" <wa*@too.much.spam> wrote in
news:7D**********************@newsread2.prod.itd.e arthlink.net:
Bottom line, we can't have two input controls for the upload process.
I need to get to that second file. How? I know the local path but
the web server can't deal with that can it?

Thanks for your help.


You can upload exactly one file per <input type=file> tag. There's no way
around that. You also can't script those tags (that would be a gaping
security hole).

If the client needs to send 2 files to the server, then there will have to
be 2 <input type=file> tags, and the user will have to type in (or browse
to) 2 separate filenames.

Mark
Nov 15 '05 #2

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

Similar topics

5
by: Don | last post by:
Is there some way to populate the "Browse" box for a <input type=file...> with a default value? I can do it for <input type=text...>, but can't seem to do it for <input type=file...>. Any ideas?...
4
by: Bhavin | last post by:
Hi I'm trying to input image file using this synax. <input type=file name="tx_file" accept="image/*" class=boxText> But when open file dialouge appears, it shows all the file and user can select...
0
by: Axe | last post by:
Here's the problem: I've got an ASP.NET (C#) web page that has a single <input type=file> control on it for uploading a file. The way the code works is that the uploaded file is then parsed for...
2
by: Evgeny Zoldin | last post by:
Hi ALL. I need to simulate send POST data ( - file upload) as it was submitted in Browser. In C# I create instanse of IE, navigate to page with the form, fill in the fields and try to Submit by...
10
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page...
1
by: Irfan Akram | last post by:
Hi Guys, I am creating dynamic controls in asp.net. I am having problems creating dynamic Htmlinputfile controls, and even after being created I cannot view it. Is there a way of creating such a...
6
by: reiyel | last post by:
hiya all i would like to ask some help for a little javascript, here's my problem: i have a html page with a <input type="file"> box, problem is i don't want the user to be able to write on the...
4
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image...
1
by: paragbhavsar | last post by:
Hello Friends, Can we simulate click event of Input File Control through Javascript - I want this for Firefox 3.5 browser ? I have also tried with following code. Please let me know solution...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.