6
Contributors
7
Replies
10
Views
7 Years
Discussion Span
Last Post by Shilpakmthn
0

Hello,
The code which you given is only working in Internet Explorer and not working in other browsers such as firefox, opera, chrome....

0

try some thing like this as per your purpose...
System.Drawing.Image Img = default(System.Drawing.Image);
Img = System.Drawing.Image.FromStream(fupho.PostedFile.InputStream, false);

0

Hi,

I used the above code to handle images uploaded by Fileupload control.

But geting full path from Fileupload control is depend on the browser which you use.
It is a matter of security level and you will not get full path from all browsers.
Hope this help you.

0

For getting the full path of the file.
check the following code

FileUpload1.PostedFile.FileName

0
Dim fileName As String = "myfile"
Dim pathname As String = "\mydir\"
Dim fullPath As String

fullPath = Path.GetFullPath(pathname)
Console.WriteLine("GetFullPath('{0}') returns '{1}'", pathname, fullPath)

fullPath = Path.GetFullPath(fileName)
Console.WriteLine("GetFullPath('{0}') returns '{1}'", fileName, fullPath)
0

fileUpload1.SaveAs(Server.MapPath(“~/uploads/”) + System.IO.Path.GetFilename(fileUpload1.FileName));

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.