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_f ile 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?
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_f ile 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?
Comment