Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

How to upload image from 1 server to other.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
laziers@gmail.com - 04 Feb 2008 08:50 GMT
Hi,
I have 2 hostings one is in USA and the second is in the my country.
So, is there any way to do uploading users pictures from the 1st
server to secound without using FTP? Maybe upload control can do this?

bye
siccolo - 04 Feb 2008 15:44 GMT
maybe create a web service on the server with web method...something
like this?:
[WebMethod(Description = "Check Image Upload")]
   public bool CheckImageUpload(byte[] byteImage,
                               out string ErrorInfo)
   {

       ImageUpload iu = new ImageUpload();

....
....
...

           if (!iu.SaveImageToFile(byteImage, out ErrorInfo))
           {
               return false;
           }

           ErrorInfo = "";
           return true;
       }

       catch (Exception ex)
       {
           ErrorInfo = ex.Message;
          return true;
       }
   }

...
...
public bool SaveImageToFile(byte [] byteImage,
                               out string ErrorInfo)
   {
       try
       {
           string ImageFileFullPath = <path to
image>;

           System.IO.MemoryStream ms =
                   new System.IO.MemoryStream(byteImage);

           System.Drawing.Bitmap bitmap =

(System.Drawing.Bitmap)System.Drawing.Image.FromStream(ms);

           bitmap.Save(ImageFileFullPath,
System.Drawing.Imaging.ImageFormat.Png);

           ErrorInfo = "";
           return true;
       }
       catch (Exception ex_save_image)
       {
           ErrorInfo = ex_save_image.Message;
           return false;
       }
   }

...
...
laziers@gmail.com - 04 Feb 2008 21:42 GMT
> maybe create a web service on the server with web method...something
> like this?:
[quoted text clipped - 57 lines]
> ...
> ...

oh, thats a good idee :)
laziers@gmail.com - 04 Feb 2008 21:43 GMT
> maybe create a web service on the server with web method...something
> like this?:
[quoted text clipped - 57 lines]
> ...
> ...

btw, what is faster? web service or file transfare [ftp] ?
siccolo - 05 Feb 2008 01:08 GMT
On Feb 4, 4:43 pm, "lazi...@gmail.com" <lazi...@gmail.com> wrote:

> > maybe create a web service on the server with web method...something
> > like this?:
[quoted text clipped - 61 lines]
>
> - Show quoted text -

SOAP/HTTP versus FTP? in general FTP is faster...but...FTP is more
efficient for large(er) files, and HTTP is for smaller...but FTP and
HTTP based on the same TCP/IP...but, it all depends on the bandwith,
servers, application etc etc..my 3cents:)
laziers@gmail.com - 06 Feb 2008 07:09 GMT
> SOAP/HTTP versus FTP? in general FTP is faster...but...FTP is more
> efficient for large(er) files, and HTTP is for smaller...but FTP and
> HTTP based on the same TCP/IP...but, it all depends on the bandwith,
> servers, application etc etc..my 3cents:)

ok :) thx for answare

bye

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.