File Count on Advanced Multi Uploader Support
File Count on Advanced Multi Uploader
Question:
How can I count how many files are uploaded using Advanced Multi Uploader?
Answer:
If you would like to show a user how many files were uploaded, it is possible to create a Session Variable and each time a file was succesfully uploaded, increase the value of this Session Variable by 1. The code needed to create the Session Variable and increase its value is shown below.
If pau.Done Then
Session("filecount") = Session("filecount") + 1
End If
The complete code of the Advanced Multi Uploader would like like this, also showing were the code for the Session Variable needs to be placed.
<%
'*** Pure ASP File Upload 3.0.14
' Process form upload1
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "ScriptLibrary"
pau.ConflictHandling = "over"
pau.StoreType = "file"
pau.UploadFolder = """MyUploadFolder"""
pau.ProcessUpload
pau.SaveAll
If pau.Done Then
Session("filecount") = Session("filecount") + 1
End If
%>
To have the value of the variable displayed on a page, just use this code:
<%=Session("filecount")%>
Give it a try and see what happens! I'd really appreciate your feedback on your results! If you have any questions just let me know!
Comments
Be the first to write a comment
You must me logged in to write a comment.