Using the standard .net upload control, I can do this:
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
Dim fname As String = FileUpload1.FileName
'Here I can do some validation on the file type
If fname.EndsWith(".jpg") Then
'I can also augment the file name prior to uploading, like this:
fname = Now.ToString("yyyyMMdd-HHMMss-") & fname
'After validation and file name augmentation, I can then choose to upload the file:
FileUpload1.SaveAs(Server.MapPath("~/files/") & fname
'Inform user that file must be of type .jpg
I just want to duplicate this simple behavior with the Ajax Uploader. Is this possible?
I seem to be running in circles.
Is there any way to duplicate the simplicity of the code above with the Ajax Uploader?