Hi all,
Im doing a multiple upload with aspSmartUpload. I loop through the file elements. One of the form elements i want to put in one folder and the others in another folder.
To do this in need to get the fieldname of the current file upload, so i can do a condition when saving the file.
Code:
For each file In mySmartUpload.Files
' Only if the file exist
' **********************
If not file.IsMissing Then
'Generate Random file name
dim max,min
max=99999999
min=00000001
RanFileName = (Int((max-min+1)*Rnd+min))
' Add extension
FileExt = "." & file.FileExt
' Merge Random File Name and extention
FileName = RanFileName & FileExt
If *FieldName here...* = "OppImage" Then
file.SaveAs("/gameslink/uploads/" & FileName)
Else
file.SaveAs("/gameslink/files/" & FileName)
End If
Response.Write "File Uploaded: " & FileName & "<BR>"
End If
Next
Thanks for your help
Tim
TDA