This is driving me crazy, and I feel like I should know this, but for some reason it's just not coming to me. I scoured the related questions but no dice.
I am uploading a file using a simple FileUpload control named theFile
(ASP.NET). I'm trying to get the absolute path of the file, but thefile.PostedFile.FileName
and thefile.FileName
are the exact same, just the file name, no path! I can't use Server.MapPath because I will be saving this file on a different server (transferring via byte array through a webservice).
It breaks at this line:
Dim fStream As New FileStream(thefile.FileName, FileMode.Open, FileAccess.Read)
because it is taking the filename and mapping it to the relative path of my VS! I need the absolute path...
Thanks, I'm really not a n00b even though sometimes it may appear that way :\