Solved

Multiple File Upload

Posted on 2001-08-31
18
344 Views
Last Modified: 2008-02-01
How to upload multiple files at a time?

In details...

A page contain one html editor. It facilitates user to create a page according to his requirement. Obiviously it may contains more than one image files which i want to upload at a time while submitting the page.

Note:- The html editor contain only the text. So there will not be any <FILE> for browsing. Only the image physical path will be present e.g.
<IMG src="c:\images\a.gif" align=left>
<IMG src="c:\images\b.gif" align=center>
<IMG src="c:\images\c.gif" align=right>

0
Comment
Question by:indushyd
  • 6
  • 6
  • 2
  • +3
18 Comments
 
LVL 2

Expert Comment

by:joegass
ID: 6444591
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6444840
ASPSimpleUpload http://www.asphelp.com/aspsimpleupload/ will do multiple uploads.

0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6444880
For more possibilities check here; http://hotscripts.com/ASP/Scripts_and_Components/File_Manipulation/Upload_Systems/

While most of these are free, remember that they are components and must be installed on your server, if you need a solution that has no components look into Pure ASP Upload.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6444931
Here is another excellent component, even the samples has a multiple image upload script already done!  :-)

http://www.websupergoo.com/abcupload-1.htm
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6445018
Software Artisans SAFileUp is excellent, though you'll have to pay for it. It has a vary easy multiple file upload component. If you name your form's file input boxes the same thing, it's even easier.

Just do a simple For Each file in objFileUp.FormEx("Files").
0
 

Expert Comment

by:shastry_yedavalli
ID: 6451057
I have provided a complete script and download for file uploads using plain vanilla server-side VBScript.

You need not install any components to use the script.

You will find the script under ASP section of my website, http://www.shastrynet.com/

Good luck...
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6451081
shastry_yedavalli, it is an accepted practice here at EE to not lock a Q by submitting an answer to this type of question, one that can have many answers...

While your suggestion is a viable solution, I see every preceding comment as a solution also.  I do not see in your examples any method of uploading multiple files, plus you even state that your method can be a security hole.  Plus you even state that your method is not complete, what's up with that?  

This is not a viable answer...
0
 

Author Comment

by:indushyd
ID: 6478527
Required answer not found.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6478793
Are you talking about physically uploading a file from the users machine, or are they selecting a file already on the server?

If you want the user to select one of their local files, but you don't want to send this file to the server, you have NO CHANCE!!!

That's the whole thing with server/client relationships. If the client is not itself a server, then anyone else trying to access that image will be prevented.

If it's a file on the server that the user chooses, then that's not uploading you're looking at, but rather writing the path of the image (on the server) into your database.

So to summarise:

If you want to use images on the clients machine, those images wil have to be "uploaded" (with a file field) to the server.

If you're selecting images off the server, then look at using the FileSystemObject to select the imag in question, kind of like a windows explorer type-thing, where the user can open directories and select the images they want.
0
 

Author Comment

by:indushyd
ID: 6490207
Yah!, I am talking about physically uploading a file from the users machine. In my script there is no file object present, only the file path that also i am finding programatically.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6490307
Right. You WILL needa file-upload component, or use the free do-it-yourself one available at http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20184197

Then you have to send those files from the Client to the Server, at which point the server then saves the files to a local directory and writes that path to the database.

If you're thinking about me as a user selecting a file "D:\user\temp\something.doc" and then for you to write that string to the database, then you've got it wrong. Your server will need that file sent to it from the client. You then need to get that file, and save it on the server.

check out any of the above suggestions. We know what you're trying to do, and these are the ways of doing it.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6490313
If on my file system, I have a file C:\something\something\test.doc, I doubt it very much if that same file in that same location will be present on the server? Unless of course, the client and server are the same machine, and this application can only ever be used from the same machine that's holding the server? Then what's the point of that?
0
 
LVL 9

Assisted Solution

by:AlfaNoMore
AlfaNoMore earned 25 total points
ID: 6490337
This is a owerful looking freebee: http://www.asp101.com/articles/jacob/scriptupload.asp
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6490414
indushyd, what do you mean "no answer found", what you request is simple if yo ujust think about it.  Look at this example;

This file create a page that has 2 file upload boxes,

<html>
<body>
<form method="post" action="imageupload.asp" enctype="multipart/form-data">
<input type="file" name="image1"><br>
<input type="file" name="image2"><br>
<input type="submit" name="submit" value="submit">
</form>
<body>
</html>

And this file processes the files;

<% @Language="VBScript" %>
<%
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = True
Set theField = theForm("image1")(1)
If theField.FileExists Then theField.Save theField.FileName
Set theField = theForm("image2")(1)
If theField.FileExists Then theField.Save theField.FileName
%>
<html>
<body>
Images uploaded...
</body>
</html>

The above example uses the ABCUpload component found at http://www.websupergoo.com/abcupload-1.htm  It really doesn't get any easier than this.  You can change the file name, change the path, just about anything... read the docs.

It doesn't get any simpler, really.

This thread has gone on long enough for only 50 points.
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6490448
Yeah, but indushyd wants to NOT have a file upload form field, he wants to have text fields, and he wants these to send files from the client to the server, without uploading them!!!

Hmmm, I'm thinking things aren't quite going to happen like this, are they? :-)
0
 
LVL 18

Accepted Solution

by:
mgfranz earned 25 total points
ID: 6490493
Wait a minute...  He wants a memo field populated with basic HTML code;

<textarea cols="40" rows="10" name="test">This is a test, the images inside here need to be uploaded, <img src="c:\inetpub\wwwroot\images\test.gif" border="0">, and another one is <img src="c:\inetpub\wwwroot\images\test2.gif" border="0">.</textarea>

And then the images inside this textarea needs to be pulled out for uploading?

Yes, it can be done, using a few functions and some RegExp, but not for 50 points!  More like 300!
0
 
LVL 33

Expert Comment

by:hongjun
ID: 8763972
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[split b/w AlfaNoMore and mgfranz(Accepted)]

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hongjun
EE Cleanup Volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

18 Experts available now in Live!

Get 1:1 Help Now