I wonder if anyone can help???
I currently developing a small application that allows a user to select a number of files (jpg) and upload them to the server.
I want the files uploaded to automatically renamed, say something like - gallery01_01.jpg and the next file being gallery01_02.jpg but the name i.e. gallery01 must be taken from a form input, that the user inputs.
I'm using saFileup as the controller... can this be done ???
<%
if Request.QueryString("uploader") = "true" then
Set upl = Server.CreateObject("SoftArtisans.FileUp")
basePath = Server.MapPath("\bambuddha\")
upl.Path = basePath & "\upload\gallery"
upl.CreateNewFile = true
strFileName = Mid(upl.UserFilename, InstrRev(upl.UserFilename, "\") + 1)
folder = upl.form("directory")
For Each strFormElement In upl.Form
If IsObject(upl.Form(strFormElement)) Then
If Not upl.Form(strFormElement).IsEmpty Then
upl.Form(strFormElement).Save
End If
End If
Next
End If
%>
I currently developing a small application that allows a user to select a number of files (jpg) and upload them to the server.
I want the files uploaded to automatically renamed, say something like - gallery01_01.jpg and the next file being gallery01_02.jpg but the name i.e. gallery01 must be taken from a form input, that the user inputs.
I'm using saFileup as the controller... can this be done ???
<%
if Request.QueryString("uploader") = "true" then
Set upl = Server.CreateObject("SoftArtisans.FileUp")
basePath = Server.MapPath("\bambuddha\")
upl.Path = basePath & "\upload\gallery"
upl.CreateNewFile = true
strFileName = Mid(upl.UserFilename, InstrRev(upl.UserFilename, "\") + 1)
folder = upl.form("directory")
For Each strFormElement In upl.Form
If IsObject(upl.Form(strFormElement)) Then
If Not upl.Form(strFormElement).IsEmpty Then
upl.Form(strFormElement).Save
End If
End If
Next
End If
%>