Replies Back to Article
Give The File a Static Name
Williamchill@hotmail.com
I was able to get the above code to work by using:
UploadRequest.Item(GP_curKey).Item("FileName") = "image.jpg"
However, I'd like the image name to be the value of one of the other fields I'm submitting, like:
UploadRequest.Item(GP_curKey).Item("FileName") = LastName & ".jpg" where LastName is a form field name.
How can I accomplish this?
The variable GP_CurFileName doesn't exist at the moment when I look at the source code for PureASPupload installed into my ASP page...
The actual line marked in red in the "solution" above is as follows:
GP_strm2.SaveToFile Trim(Server.mappath(GP_curPath))& "\" & UploadRequest.Item(GP_curKey).Item("FileName"),2
So what should I do? replace the UploadRequest.Item(GP_curKey).Item("FileName") with the filename that I want to use?
Cheers