AspUpload question

T

the other john

I'm not certain that what I'm asking is an AspUpload question or just a
VBScript question.

I am uploading a story with up to 3 pictures. Each picture uploads
using aspupload with no problems. What I need to do is while iterating
through the for each loop for each picture I need to identify each
picture as "picture_1", "picture_2", "picture_3" in the database. When
the story is called it will deliver 3 pictures in specific places so I
need to identify which is which when when the loop executes. Picture 1
goes here, etc. What's confusing me is I can't use Request.Form
because it uses multipart/form-data. Will this just be a matter of
using If Then?

Thanks!!
 
K

Kyle Peterson

after your Server.CreateObject call

use this format... example

Album_ID = Upload.form("Album_ID")
NewAd = Upload.form("NewAd")
PicNumber = Upload.form("PicNumber")

it's all in their docs
 
T

the other john

Thanks Kyle. The trouble Im having however is how do I identify which
file is being processed while it is being processed?

I tried this but it's not working...

If Upload.Files("FILE1") <> "" Then
rsPicData("fld_picture_picNumber") = 1
ElseIf Upload.Files("FILE2") <> "" Then
rsPicData("fld_picture_picNumber") = 2
ElseIf Upload.Files("FILE3") <> "" Then
rsPicData("fld_picture_picNumber") = 3
Else
'don't do jack
End if

What I need to do is to be able to put into the database which picture
is which so when it's delivered each will be in the place the user
wants it placed.

Thanks again!
 
T

the other john

I might not have been clear enough...or maybe no one knows...

When using AspUpload while iterating though the For Each loop is there
a way to identify "which" file is being processed while it's being
processed? I need to uniquely identify which file is which (pictures
in this case) so I can place each picture in a specific place on the
front end. How does AspUpload decide which file to process first?
last? If I know that maybe I can solve this.

Thanks everyone!!
 
K

Kyle Peterson

look at their example codes... they provide plenty of examples of dealing
with multiple files during upload..

really it's best to ask them though
 
T

the other john

I did that and I was going nuts because I couldn't find a
solution...until now, yes!!!!!

This is what I ended up doing..

If File.Name = "FILE1" Then
rsPicData("fld_picture_picNumber") = 1
ElseIf File.Name = "FILE2" Then
rsPicData("fld_picture_picNumber") = 2
ElseIf File.Name = "FILE3" Then
rsPicData("fld_picture_picNumber") = 3
Else
'don't do jack
End if

This works. I was getting confused with File.Name and File.FileName.
HTH others in the future.
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top