Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Upload image thumbnail to Web Server ? Problem...

Thread Tools

Upload image thumbnail to Web Server ? Problem...

tapasmahata tapasmahata is offline
Junior Member
Join Date: Jan 2008
Location: Kolkata
Posts: 7
I want to upload an image to my web server. Uploading simple images work fine but when i tried to upload the generated thumnnail to another folder named Thumb, i can't.
It works fine in local system but not in web server so I think that there may be some problem in my uploading code( may be in the last line of my code). Please do some modification with this code so that I can upload the image to the Web Server also...

Please help me...its a very urgent task for me...


// Get the path of the original Imagestring displayedImg = Server.MapPath("./images/") +this.txtPCode.Text+".jpg";
string path=Server.MapPath("/images/");
// Get the path of the Thumb folderstring displayedImgThumb = Server.MapPath("./Thumb/");

// Get the original image file namestring imgFileName = Path.GetFileName(displayedImg);

// Load original image
System.Drawing.Image myimg = System.Drawing.Image.FromFile(displayedImg);

// Get the thumbnail 50 X 50 pxmyimg = myimg.GetThumbnailImage(50, 50, null, IntPtr.Zero);

// Save the new thumbnail image
myimg.Save(displayedImgThumb + imgFileName, myimg.RawFormat);
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
upload multiple image to server from remote server RichB ASP .Net 4 03-20-2008 01:58 AM
Upload image to wwwroot as thumbnail... tapasmahata Software 0 01-24-2008 11:20 AM
save uploaded image thumbnail to sql db image field dodgeyb ASP .Net 1 12-14-2007 04:29 PM
How to make thumbnail image from web page? Trenk Perl Misc 8 12-08-2007 08:51 PM
Displaying a Thumbnail vs. creating a thumbnail David Lozzi ASP .Net 1 02-01-2006 10:34 PM