Upload, chunk and big files

When you upload a file, apache (and nginx, I guess) usually stores the file in memory if it’s small. If it’s big (more than 2MB maybe?) they use temporal files to store the files.
Once apache have the whole uploaded file, it give PHP control over it, so ownCloud can move it to wherever it wants.
In case of chunks, the process is the same for apache, it just consider the chunk as the whole file.

There is occ dav:cleanup-chunks command for that. You can set it up in cron to run it periodically according to your needs.

Other than that, it’s nearly impossible to provide a proper way to cleanup, mainly because the client could reupload the failed chunk at any time, but the server doesn’t have any idea about when: it could be in 5 minutes, in 30 minutes or 8 hours, or more

2 Likes