From the web app perspective you can use something like this to grab the upload (search web.config fixes to control the allowed size of the upload)
public void UploadFile(HttpPostedFile File)
{
string extension = Path.GetExtension(File.FileName).ToLower();
string mimetype;
byte[] uploadedImage = new byte[File.InputStream.Length];
switch (extension)
{
case ".png":
case ".jpg":
case ".gif":
mimetype = File.ContentType;
break;
default:
_view.ShowMessage("We only accept .png, .jpg, and .gif!");
return;
}
if (File.ContentLength / 1000 < 1000)
{
File.InputStream.Read(uploadedImage, 0, uploadedImage.Length);
profile.Avatar = uploadedImage;
profile.AvatarMimeType = mimetype;
profile.UseGravatar = 0;
_profileRepository.SaveProfile(profile);
_view.ShowCropPanel();
}
else
{
_view.ShowMessage("The file you uploaded is larger than the 1mb limit. Please reduce the size of your file and try again.");
}
}
In the above code the profile object is a LINQ to SQL object and the image is being stored in a VarBinary(MAX) field in a SQL 2k5 db.
You shouldn't need an app server or temp files or any of that (assuming that your pipe is fast enough and you don't experience times outs).
You my try writing an active x or java client program to package the file being sent or split up the file being sent to make your app more reliable and more efficient.
Andrew Siemer www.andrewsiemer.com blog.andrewsiemer.com www.socialnetworkingin.net