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.
For each file In mySmartUpload.Files
' Only if the file exist
If not file.IsMissing Then
'Generate Random file name
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)
file.SaveAs("/gameslink/files/" & FileName)
Response.Write "File Uploaded: " & FileName & "<BR>"
Thanks for your help