Re: Ftp upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Richard,

So,  say,  they  make  audiobooks  or  movies and they want them to be
available   as   (paid)  download.  How  should they upload it so they
would be in the catalog?



-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: admin@xxxxxxxxxxxxxxxxxxx <admin@xxxxxxxxxxxxxxxxxxx>
To: 'Andre Polykanine'
Date created: , 5:46:00 PM
Subject:  Ftp upload


      Andre,
        Anything over 7 MB to me should be done with FTP. 
You have a lot of issues with file corruption, length of upload, and bandwidth on each end.

But you have to remember, I am crazy in the head. "I think that customer satisfaction is key!!!"

Richard L. Buskirk


-----Original Message-----
From: Andre Polykanine [mailto:andre@xxxxxxxx] 
Sent: Tuesday, June 14, 2011 10:02 AM
To: admin@xxxxxxxxxxxxxxxxxxx
Cc: 'Php General'
Subject: Re:  Ftp upload

Hi Richard,

Thanks a lot!
So  can  I  let  them  upload, say, a 700 Mb file via POST or should I
consider connecting to FTP?


-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

------------ Original message ------------
From: admin@xxxxxxxxxxxxxxxxxxx <admin@xxxxxxxxxxxxxxxxxxx>
To: 'Andre Polykanine'
Date created: , 3:41:59 PM
Subject:  Ftp upload


      Andre, I have checked the $_POST, and THE $_FILES.
I am pretty sure the actual path is not passed. Now you can find the path on the server in the tmp_name of the $_FILES array.

I have read a few DOM related issue concerning the PATH of the file uploaded in mulitpart/form-data.


Microsoft: Internet Explorer 7 and later. By default, Internet Explorer does not include folder or directory path information when uploading files to sites.

So this means the "Clients Browser" is passing the file name NOT the path.

I am sure if you dig around in JavaScript you may find a way to see the value of that attribute on submit or click.
I have never wanted to know the actual file path from the end user, nor has it ever been a request for me to do so.


You can however change the ini for upload_max_filesize and post_max_size inside of your php script at the top.

<html>
<head>
<title>A file upload script</title>
</head>
<?php
ini_set('upload_max_filesize', 8000000);
ini_set("post_max_size", "30M");

$file_dir = ".";
$file_url = ".";
if ( isset( $fupload ) ){
   print "path: $fupload<br>\n";
   print "name: $fupload_name<br>\n";
   print "size: $fupload_size bytes<br>\n";
    print "type: $fupload_type<p>\n\n";
   if ( $fupload_type == "image/gif" ){
     copy ( $fupload, "$file_dir/$fupload_name") or die ("Couldn't copy");
     print "<img src=\"$file_url/$fupload_name\"><p>\n\n";
   }
}
?>
<body>
<form enctype="multipart/form-data" action="<?php print $PHP_SELF?>" method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="51200">
    <input type="file" name="fupload">
    <input type="submit" value="Send file!">
</form>
</body>
</html



Richard L. Buskirk


-----Original Message-----
From: Andre Polykanine [mailto:andre@xxxxxxxx] 
Sent: Tuesday, June 14, 2011 7:38 AM
To: Php General
Subject:  Ftp upload

Hi everyone,
I would like to have a possibility to upload really large files to the
website.
As we all know, the post_max_size parameter is set to 8Mb by default.
However,  I  see  that  the  ftp_put() function has a "local filepath"
parameter.
And  the  question is: how can I retrieve the local filepath if a user
browses to the file from his/her PC?
Thanks!


  

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux