Author: freddy32 | Posted on: 4/11/2010 3:46:30 PM | Views : 320

Hi,
I'm presently trying to create a form in wich I have to upload a file. Everything is working fine, except my FileUpload control.
Everytime I'm trying to post a file I'm getting a 112 bytes file, whatever the real size of the file is. So, there is missing content and there's data corruption when I'm trying to use the file.
Here's a part of the code I'm using :
//Saving
imgFile.SaveAs(imgPath) <-- Work's fine, but I can't open the resulting image
ReduceImg(imgPath)
ReduceImg function:
Public Function ReduceImg(ByVal img As String) As Drawing.Bitmap
        Dim fs As FileStream = File.OpenRead(img)
        Dim original As Drawing.Image = Drawing.Image.FromStream(fs, True, True) <-- Error here: Parameter is not valid (right, because it is not a good image file stream)
        Di ...

Go to the complete details ...