Multiple File Upload with ASP.NET

D

der_grobi

That is the Problem:
I have an ASP.NET Webapplicatipon where I can upload single files to
the Server.

That works fine. But now, I want to Upload multiple files. I know the
path of the files, i know then name(s) of the files. Security is no
problen (the Application works in an Intranet).

I search for a Javascript solution - but I only found: "That doesn't
work! Try FTP or PHP!" But there's no possibility to use PHP or FTP. I
only have ASP.NET and Javascript!

Can someone Help me?
 
P

Patrice

Try :
http://support.microsoft.com/kb/296772

This is not exactly what you are looking for but you should be able to do
something like :
- client side you'll use :
- ADOB.Stream to load the file (it has a LoadFromFile method)
- XMLHttp to post the file content to a server page
- server site you can get the files with Request.Files...

You'll have of course to change your security settings.

Another option is just to place mutliple file upload controls on the page
(but then the user must define the files to upload for safety reasons and
AFAIK you can't change this (the input type=file value is read only).
 
D

der_grobi


Thank you for this great hint!
The Problem is: All solutions for my problem, which I found with
goolge doesn't work because I have to tell the application which
file(s) I want to upload with the <INPUT> - Control.
With this control I have to choose the file from my Harddisk.
If i want to Upload 5 Files, I must select exactly 5 files.

In my Application, I want to upload nearly 1000 PDF-Documents from a
CD every month, sometimes more!
What iI need is something like

(Attention: it's not real Code ;)

string datasource ="d;\documents\" ;
string datatarget = target for the documents - a directory on the
Webserver

For each File in datasource
File.Upload (datatarget )

All I have to do is to choose the Directory and then Start the Upload!
No file-selection!
Is this possible???
 
M

Mark Rae [MVP]

Now we can see, that it is possible to upload multiple files by
selecting only the directory. Thats exactly my problem!
But I want to realize it by using ASP.Net - without any expensive
Applets. Thats the next problem!

Expensive applets??? Prices start at under $200...
Is where a way to do it?

Yup - learn Java, and write your own applet - that's what the Unlimi-Tech
people clearly did...

How long do you think it will take you...?

That's how I define "expensive"...
 
D

der_grobi

Expensive applets??? Prices start at under $200...


Yup - learn Java, and write your own applet - that's what the Unlimi-Tech
people clearly did...

How long do you think it will take you...?

That's how I define "expensive"...

Okay, you're right! It's cheaper to buy some Tools. I will tell my
Boss to do so.

But i want to know at all - is where a way to realize this problem by
using ASP.NET? If wheres a way, I want to know it!!!
I don't have the time to learn Java, but I have time to learn more
about ASP.NET and C#.
 
P

Patrice

If this is a a done from a machine that is on the corporate network, I would
just copy them on a network share where the web application could get them
rather than bothering to do this inside the application.

It could be also a windows application that posts these files if this is
done by someone in particular...

Else use an applet or check my earlier response if you have really to do
this from the browser...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top