473,738 Members | 11,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simulate File upload (multiple files)

TK
I have a file upload control to allow a user to select/upload a file
to the server. They need to upload x number of files in one shot
because they have to confirm that they are uploading x number files
for processing. So I do not want the files to be uploaded until the
user presses a submit button verifying that they want to submit x
number of files for processig (processing refers to me doing something
to the files once uploaded). Catch is that I only want one input file
control which adds the filename of the file to be uploaded to a
datagrid and only uploads all the files when the user clicks a cubmit
button.

Right now I have a datatable that is kept in viewstate that keeps
track of the files (filename and full client-path of the file to
upload) the user has added. The datatable is bound to a datagrid which
displays a delete button (to remove a file from the list of files to
upload) and the actual name of the file being uploaded.

So is there a way to accomplish this without creating a HTMLInputFile
control for every file that is to be uploaded? The datatable also
stores the full path of the file (e.g. c:\somedir\clie ntfile.txt) that
the user selected using the file upload browse button. I basically
need to simulate the file upload process using the filenames (with
full path) from the datatable. Is this possible or is there a
different way of accomplishing this?

Thx in advance for any help.
Tom
Nov 18 '05 #1
1 2554
I doubt this is possible. Without the HTMLInputFile control, the browser
isn't going to submit the file data. This is for both RFC and security
reasons.

You could write an ActiveX or WinForms control to accomplish this.
--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
"TK" <tk******@hotma il.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
I have a file upload control to allow a user to select/upload a file
to the server. They need to upload x number of files in one shot
because they have to confirm that they are uploading x number files
for processing. So I do not want the files to be uploaded until the
user presses a submit button verifying that they want to submit x
number of files for processig (processing refers to me doing something
to the files once uploaded). Catch is that I only want one input file
control which adds the filename of the file to be uploaded to a
datagrid and only uploads all the files when the user clicks a cubmit
button.

Right now I have a datatable that is kept in viewstate that keeps
track of the files (filename and full client-path of the file to
upload) the user has added. The datatable is bound to a datagrid which
displays a delete button (to remove a file from the list of files to
upload) and the actual name of the file being uploaded.

So is there a way to accomplish this without creating a HTMLInputFile
control for every file that is to be uploaded? The datatable also
stores the full path of the file (e.g. c:\somedir\clie ntfile.txt) that
the user selected using the file upload browse button. I basically
need to simulate the file upload process using the filenames (with
full path) from the datatable. Is this possible or is there a
different way of accomplishing this?

Thx in advance for any help.
Tom

Nov 18 '05 #2

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

Similar topics

7
4000
by: lion | last post by:
I get these errors when uploading images via a web page: (the page still uploads the images but reports these errors?) Warning: fopen(D:\php\uploadtemp\php1FC7.tmp) : failed to create stream: No error in D:\webspace\me.co.uk\wwwroot\test\Live.php on line 105 Warning: Wrong parameter count for filesize() in D:\webspace\me.co.uk\wwwroot\test\Live.php on line 109
10
5018
by: 3A Web Hosting | last post by:
Hi Is it possible to perform multiple file uploads via a form? It's no problem uploading single files but I want to be able to highlight a group of files and upload them all in one go. My current method, multiple <INPUT TYPE="FILE" NAME="userfile"> entries, works but means selecting each file individually. -- Colin
2
1933
by: Sundar | last post by:
Hi, I am working on ASP.Net. My requirement is that I want to Upload Multiple Files to the Server. I need to have ONLY ONE FILE UPLOAD CONTROL in my page. I SHOULD NOT SUBMIT THE PAGE FOR EACH AND EVERY DOCUMENT browsed. I am having a File Upload HTML Control and an Add Button on my page. The user will browse for the document to be uploaded and then click on that Add button. I then add the
13
4317
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
0
4485
by: Yandos | last post by:
Hello all, I'm sorry for a bit off-topic post, but curl does not have own newsgroup, so I hope someone might help me here... I need to feed form like the following using libcurl: <form action="file-upload.php" method="post" enctype="multipart/form-data"> <input name="senderid" value="1111" type="hidden"> <input name="senderpass" value="blah" type="hidden">
7
3190
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file" name="file_1" size=46 /><input type=submit /> so, after adding a few files, the input fields look like this:
0
1622
by: pbd22 | last post by:
Hi. I am having a really tough time here and would appreciate some help. i am using an iFrame to pass a url string of files to upload to server. on the client i have created a multiple upload javascript using the below link: http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/
6
2710
by: Milan Krejci | last post by:
while(list($key,$value) = each($_FILES)) { if(!empty($value)){ $filename = $value; $add = "upimg/$filename"; echo $_FILES; $error=copy($_FILES, $add); if (!$error) $progressUploadingPhotos=false; $error=chmod($add,0777); if (!$error) $progressUploadingPhotos=false;
7
7153
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and Silverlight 2.0. To get these tools please visit this page Get Started : The Official Microsoft Silverlight Site and follow Step 1. Occasionally you find the need to have users upload multiple files at once. You could use multiple FileUpload...
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
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,...
1
9263
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,...
0
9208
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
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
6053
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();...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.