I have this code to look, create and upload a file when a user is logged in.
Dim fso, f, ndir
ndir=server.MapPath(".") & "/FILES/BILLING/" & GetUploadFolder(UploadReceipts,"") &
session("UserID")
Set fso = CreateObject("Scripting.FileSystemObject")
If not fso.FolderExists(ndir) Then
set f=fso.CreateFolder(ndir)
pageObject.filesToSave(0).destFilename = session("UserID") & "/" & _
values("UploadReceipt")
values("UploadReceipt") = session("UserID") & "/" & values("UploadReceipt")
BeforeAdd=true [/i]
The issue I am having is if the user does not upload a file (which is not required for every record) the code will not save the record. Can you tell me what to add to make the record save regardless of whether the user uploads a file or not? Also, is there a way to allow them to upload multiple files at the same time?
Thanks in advance.