473,382 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Uploads files/images

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?
Jul 21 '05 #1
2 1133
What is the problem?

"Rune" <ru*****@c2i.net> wrote in message
news:16****************************@phx.gbl...
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?

Jul 21 '05 #2


"Rune" wrote:
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 :-)
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Arnall | last post by:
I am trying a simple file upload, but cannot make it work on my localhost. I wrote the following code: $strFileDir = "/images/gallery/"; $strFileName = $strFileDir . $_FILES; if...
3
by: Celine | last post by:
Hi everyone! I am building a website in asp.net using c# where I need to be able to upload 100 images to the server at a time. As I am new to asp.net, I was wondering if there was an easy way to...
0
by: Joe Finsterwald | last post by:
Here is how to build a progress bar in dotnet that doesn't require any third party components and uses JavaScript on the client side so it doesn't require any additional post backs. This script...
2
by: Rune | last post by:
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?
12
by: JMB | last post by:
Hello, I was wondering if anyone knew of any projects extending the inline upload progress bar to utilize an inpage image uploader with bar, without having to refresh or go to a seperate page,...
4
by: Steven | last post by:
I have a situation where I need to upload more than one file from a client to the server, I am having problems finding any examples of how I can ahhieve my goal. My Requirements are: 1, There...
4
by: mcrose | last post by:
I've written theh standard applicaiton for our client to allow indexed (customer name, subject etc) file uploads via secure http using the <input type='file'http element. This works great, and has...
12
by: lawrence k | last post by:
I've a form that starts off like this: <form method="post" action="profile.php? id=5&formName=my_story_edit.htm" enctype="multipart/form-data"> <p>Email address:<br /> <input type="text"...
12
by: lawpoop | last post by:
I'm developing a php website that I have under subversion version control. I'm working on an image upload functionality, and in the middle of it I realized that any files that a user uploads will...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.