I've been browsing around the web for an answer to this and I can't
find a good answer to it.... here's the problem:
I am using an ASP include file called "ClsUpload.asp" to upload a text
file for processing. I also have a select drop down that i am
submitting along with the file, in order to determine where in the
database this info goes. My problem is that I can upload the file
without any problems, but I can't get at the select field at all. I
first tried using the normal "Request("Listid")" function, but that
didn't work (At first I was using it after the file upload and it gave
me an error message. Then I moved it to before the upload and it
doesn't give me an error anymore, but also doesn't seem to see
anything).
Then I tried request.form("listid"), which some of the discussions on
the web point to. The code still sees nothing at all being submitted. I
tried it both before and after the file upload....
I don't see any info on doing something like this within the
clsupload.asp file, so I'm thinking that the problem is stemming from
my use of the enctype="multipart/form-data" tag.
How can I do this? I suppose that if worst comes to worst, i can just
break the form up accross two pages and use it like that, but that
seems kind of ugly. Is there a simple way around this? 5 5092
On Tue, 11 Jul 2006 09:03:48 -0500, furby <Wo*******@gmail.comwrote:
I am using an ASP include file called "ClsUpload.asp" to upload a text
file for processing. I also have a select drop down that i am
submitting along with the file, in order to determine where in the
database this info goes. My problem is that I can upload the file
without any problems, but I can't get at the select field at all.
These classes (and also their COM counterparts) work by manually
processing the form data submitted by the browser, which renders the
Request.Form collection inoperable. Normally they expose their own Form
collection so that this data is still available. If your upload utility
doesn't have such functionality, you might consider using the one from http://www.freeaspupload.net/ instead.
--
Justin Piper
Bizco Technologies http://www.bizco.com/
"furby" <Wo*******@gmail.comwrote:
>I've been browsing around the web for an answer to this and I can't find a good answer to it.... here's the problem:
I am using an ASP include file called "ClsUpload.asp" to upload a text file for processing. I also have a select drop down that i am submitting along with the file, in order to determine where in the database this info goes. My problem is that I can upload the file without any problems, but I can't get at the select field at all. I first tried using the normal "Request("Listid")" function, but that didn't work (At first I was using it after the file upload and it gave me an error message. Then I moved it to before the upload and it doesn't give me an error anymore, but also doesn't seem to see anything).
Then I tried request.form("listid"), which some of the discussions on the web point to. The code still sees nothing at all being submitted. I tried it both before and after the file upload....
I don't see any info on doing something like this within the clsupload.asp file, so I'm thinking that the problem is stemming from my use of the enctype="multipart/form-data" tag.
Basically, yes. The 'enctype="multipart/form-data"' tag causes the
contents of the form - including any files specified by <input
type="file"....tags as well as more normal tags - to be transmitted
in MIME format. All the data is there, and if the component you're
using to untangle the MIME blob isn't giving you the contents of the
"normal" tags, then it's not doing its job. I'm sure you can find
something that will work properly.
--
Tim Slattery
MS MVP(DTS) Sl********@bls.gov
Freeaspupload.asp works like a charm - thanks. Now, for the next
question and it relates directly to that particular class.
How do I retrieve the name of the uploaded file? I see a second class
named "UploadedFile" but there is no documentation for it. The
documentation refers to the filename property of the main object, but
that doesn't work...
Justin Piper wrote:
On Tue, 11 Jul 2006 09:03:48 -0500, furby <Wo*******@gmail.comwrote:
I am using an ASP include file called "ClsUpload.asp" to upload a text
file for processing. I also have a select drop down that i am
submitting along with the file, in order to determine where in the
database this info goes. My problem is that I can upload the file
without any problems, but I can't get at the select field at all.
These classes (and also their COM counterparts) work by manually
processing the form data submitted by the browser, which renders the
Request.Form collection inoperable. Normally they expose their own Form
collection so that this data is still available. If your upload utility
doesn't have such functionality, you might consider using the one from http://www.freeaspupload.net/ instead.
--
Justin Piper
Bizco Technologies http://www.bizco.com/
On Tue, 11 Jul 2006 15:14:16 -0500, furby <Wo*******@gmail.comwrote:
Freeaspupload.asp works like a charm - thanks. Now, for the next
question and it relates directly to that particular class.
How do I retrieve the name of the uploaded file? I see a second class
named "UploadedFile" but there is no documentation for it. The
documentation refers to the filename property of the main object, but
that doesn't work...
There's an UploadedFiles property that exposes a Scripting.Dictionary
object with information about all the files uploaded. Something like
this should do the trick:
Dim upload, file
Set upload = New FreeASPUpload
For Each file In upload.UploadedFiles.Items()
Response.Write file.FileName & "<br>" ' or whatever you like
Next
--
Justin Piper
Bizco Technologies http://www.bizco.com/
Excellent! Thank you very much - works like a chamr!
Justin Piper wrote:
On Tue, 11 Jul 2006 15:14:16 -0500, furby <Wo*******@gmail.comwrote:
Freeaspupload.asp works like a charm - thanks. Now, for the next
question and it relates directly to that particular class.
How do I retrieve the name of the uploaded file? I see a second class
named "UploadedFile" but there is no documentation for it. The
documentation refers to the filename property of the main object, but
that doesn't work...
There's an UploadedFiles property that exposes a Scripting.Dictionary
object with information about all the files uploaded. Something like
this should do the trick:
Dim upload, file
Set upload = New FreeASPUpload
For Each file In upload.UploadedFiles.Items()
Response.Write file.FileName & "<br>" ' or whatever you like
Next
--
Justin Piper
Bizco Technologies http://www.bizco.com/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Smithz |
last post by:
Hi There,
I have a PHP script that sends an email with attachment and works great when
provided the path to the file to send.
However this...
|
by: M P |
last post by:
Can you help me find an asp code that will upload a file from my PC to web
server?
Mark
|
by: Shawn Mesiatowsky |
last post by:
I have an html form that accepts a file for uploading, but I wanted to
create a program to automate the upload procedure.
I beileive you use the...
|
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...
|
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:
...
|
by: acoder |
last post by:
How to Upload a File in Coldfusion
Use the cffile tag for uploading files to the server.
Note that allowing people to upload files is fraught...
|
by: ganesanji |
last post by:
hi all,
I have written a php coding for uploading a file to a specific folder or location in
server which is a Linux server. I think the...
|
by: chrisj |
last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully.
In this modified version there are two...
|
by: rahulephp |
last post by:
i think i am missing something in the below script:
It shows error an do not upload files to destination:
Let me know how to solve this:
...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
| |