Uploads files/images

  • Thread starter Thread starter Rune
  • Start date Start date
R

Rune

I have create a windows application in c# with use of an
webservice.
I have a problem with upload files/images to the server
with use of a windows application.

Is't some as can help me?
 
Rune said:
I have create a windows application in c# with use of an
webservice.
I have a problem with upload files/images to the server
with use of a windows application.

Is't some as can help me?

Hi Rune,

maby this helps you:

Method to take the byte stream from the client on the ServerSide:

private bool UploadImage( string ImageFilePath, byte[] ImageStream )
{
bool RetVal = true;
MemoryStream ms = null;
FileStream fs = null;

try
{
ms = new MemoryStream( ImageStream );
fs = new FileStream( ImageFilePath, FileMode.Append );
ms.WriteTo( fs );
RetVal = true;
}
catch...
{
throw;
}
finally
{
if( ms != null )
{
ms.Close();
}
if( fs != null )
{
fs.Close();
}
}
}

Regards

Heinz :-)
 
Back
Top