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.

Ok, I have a tar.gz file somewhere in a web server. The link looks like http://abcd.com/abcd.tar.gz .. And I have an FTP server running somewhere. Now, to upload the file to the FTP server, Typically I need to download it from the web server and then upload it again to the FTP server.

But I'm wondering if there is anyway, I can directly transfer the file to the FTP server over the web. Not by downloading and uploading again. Any help?

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

There is no cross specification of HTTP and FTP which would allow the two to interact. Someone, somewhere, would have to download, and then upload it.

If you have shell access to the web server, the easiest way would be to upload it directly from the webserver to the ftp server with the ftp command (Assuming it's a *nix server.)

If you have shell access to the ftp server, then you could also use the wget command to download the file directly to the ftp server, again assuming it's a *nix server.

share|improve this answer
    
looking back at this, I feel really stupid. –  Bibhas Aug 23 '13 at 15:20
add comment

You could take a look at the File eXchange Protocol if you happen to have FTP access to the website (HTTP) server, and both your FTP server and the the website FTP sever have FXP enabled.

share|improve this answer
    
This, if you have ftp access to both :) –  sinni800 Oct 5 '10 at 8:56
add comment

You can take a look at AutoFileMove , it allow users to send files direclty to FTP, dropbox and amazon s3 from URL without downloading files to local devices first.
http://youtu.be/sSgqfeMl9is

share|improve this answer
add comment

If your server supports PHP, then you can upload a PHP file (1 or 2KB) - open it through http, copy paste the URL in the provided box, then submit. Your server will download it for you.

<html>
<form method="post">
<input name="url" size="50" />
<input name="submit" type="submit" />
</form>
 <?php
    // maximum execution time in seconds
   set_time_limit (24 * 60 * 60);

if (!isset($_POST['submit'])) die();

// folder to save downloaded files to. must end with slash
// $destination_folder = 'download/';

$url = $_POST['url'];
$newfname = basename($url);

$file = fopen ($url, "rb");
if ($file) {
  $newf = fopen ($newfname, "wb");

  if ($newf)
  while(!feof($file)) {
    fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
  }
}

if ($file) {
  fclose($file);
}

if ($newf) {
  fclose($newf);
}
?>
</html>

Copy the above script -> Open text editor -> paste -> save something*.php* Upload it and view with your browser in http .

The above script downloads the file and saves in the same directory where it resides, if you want to save in some other directory, then you need to change some piece.

share|improve this answer
add comment

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.