The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End File Chunking

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #168209

    Has anyone had experience with this?
    I wrote (with help of Google) a system that:

    1. Preps the file and makes sure things are a-ok to start uploading.
    2. Uploads a small portion of the file (2k) to make sure things will be able to be uploaded properly. I found that any issues PHP/server has will not be seen or reported until the first chunk is completely uploaded.
    3. Uploads the rest of the file in 1Mb chunks and appends their index to their filename.
    4. Once all chunks are uploaded, another xhr request is made that merges the files in order (using a loop and the last index uploaded).

    I have a question for anyone who has written file chunking stuff before regarding abandoned uploads

    If the user uploaded 50% of the file then leaves the page, their chunks remain on the server. I’d assume I’d need to store the chunks in a temp folder somewhere that I can occasionally clean out. What’s the best method to clean this folder out, or is there another way to make sure file chunks aren’t being left behind?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.