Welcome Guest Search | Active Topics | Sign In | Register

Ajax uploader control - renaming the final file name Options
Mike T
Posted: Friday, September 26, 2008 9:24:22 AM
Rank: Member
Groups: Member

Joined: 7/28/2008
Posts: 25
I have the need to specifically set the file name to something different than the original and retain the extension. See my code:

Protected Sub AJAXUploader1_FileUploaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles AJAXUploader1.FileUploaded
Dim file As EO.Web.AJAXPostedFile

For Each file In Me.AJAXUploader1.PostedFiles
Dim tempFileName As String = file.TempFileName

Dim finalFileName As String = "SessionCSID." & Right(file.FullClientFileName, 3)

System.IO.File.Move(file.TempFileName, finalFileName)

Next
End Sub

If seems to be failing because if doesnt set a TempFileName
That value is coming up as a NULL

suggestions?
eo_support
Posted: Friday, September 26, 2008 10:14:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Check FinalFileLocation. TempFileName is not available if you have FinalFileLocation set.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.