Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Uploading is described as transferring a file(s) like photo, audio file etc. to a server on the web. I wonder a couple of things how uploading occurs as network/communication means. For example, when I upload a photo from my computer to my facebook profile, does it also mean downloading that file because I display it on my web browser(client) too ?

Second question, uploading is the reverse process of the downloading. However, once we upload a file to a server, we don't have to make port forwarding. On the other hand, if downloading is sending requests to a server from a private network(accessing the outside), by this means, uploading should be accessing the private network from outside. That way, port forwarding should be performed. But even we don't do it, transferring is working. How ?

share|improve this question
2  
1. You upload a file to Facebook, then when you look at in in a browser, you request the file from Facebook, so yes: when you look at it in a browser, you download it. 2. When you upload a file, you initiate the contact with the server which has "open ports" (usually port 80 in case of HTTP). When you download the file, you also initiate the request. A remote server cannot initiate a connection with a computer inside a private network (without port forwarding), but once a connection has been established, routing makes sure you can talk to each other for the duration of the connection. –  Daniel Andersson Aug 7 '12 at 8:53

1 Answer 1

up vote 3 down vote accepted
  1. Correct, to display a photo in your browser, it has to be downloaded first. This is automatically done by your browser. The downloaded photo will be stored in the browser cache for a time to avoid repeated downloads of the same photo within a short time.

  2. The communication with a server starts by initiating a (TCP/IP) connection from the client to the server (this is called the handshake). This means that you (the client) start with any communication, not the server.

    When a connection has been established, both parties can send and receive data to/from each other. Therefore, you don't need any port forwarding to send/receive data to/from a server because, as mentioned, a server doesn't initiate any connections.

    To download data from a (web) server, the client (you) initiates a connection to the server and typically sends a HTTP GET request which just asks the server to provide specific data (e.g. a web page).

    To upload data to a server, the client again initiates a connection to the server and then typically sends a HTTP POST request which contains the data to be uploaded. The server knows how to handle such a request and stores the data.

For further information e.g. regarding TCP/IP connection establishment or the various HTTP request methods, consider the wikipedia articles about the Hypertext Transfer Protocol and the Transmission Control Protocol.

share|improve this answer
    
Well, my first question is alright. But the second one seems not. Does uploading involve port forwarding? If not, is it because uploading process again starts from the computer who requested to upload the file but not the server? –  Ozgun S Aug 10 '12 at 9:10
    
@OzgunSunal Yes, you don't need port forwarding because the client (you) starts the upload process (see first and second paragraph in section 2 of my answer). It doesn't matter if you upload or download a file, what matters is who starts establishing the initial connection - this is typically done by the client and not by the server. –  speakr Aug 10 '12 at 9:37
    
well, its been clarified. One last question, is sending out messages via chat window, twitter,facebook or posting as mail also classified as 'uploading?' –  Ozgun S Aug 11 '12 at 9:25
    
@OzgunSunal Yes. Upload is just a synonym for sending data. –  speakr Aug 11 '12 at 9:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.