Splitting uploads up/ concatenating them back together
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Splitting uploads up/ concatenating them back together

From: <nwheavyw8@gmail.com>
Date: Sat Sep 24 2005 - 06:51:02 CEST

I am currently trying to write a simple PHP script that will split an
uploading file up into 500kb "chunks", then read and concatenate them
back together when accessed for download. I can't seem to be able to
find a way to split the file purely in PHP while it is in the middle of
uploading using the move_uploaded_file function.
I am trying to get it to store the file like so:

MySong.mp3 3mb
gets uploaded to my server in this format:

   /uploads/MySong/1 500kb
   /uploads/MySong/2 500kb
   /uploads/MySong/3 500kb
   /uploads/MySong/4 500kb
   /uploads/MySong/5 500kb
   /uploads/MySong/6 500kb

Each of the "numbers" are the chunks that have been split up

Then the script to download reads these chunks and ECHOS them back out
to the as a single file (possibly even forcing a download by setting
the correct MIME type)

Is this possible at all with just PHP scripts?
Received on Tue Oct 18 02:27:29 2005