biigle / user-storage

:m: BIIGLE module to offer file upload and storage for users
GNU General Public License v3.0
0 stars 0 forks source link

Try to improve AssembleChunkedFile #26

Closed mzur closed 5 months ago

mzur commented 10 months ago

The AssembleChunkedFile job downloads each chunk and appends it to a temporary local file:

https://github.com/biigle/user-storage/blob/b1d3b7916f579d610813f6c0fea0e90785142587/src/Jobs/AssembleChunkedFile.php#L61-L74

Instead, it may be possible to append to the final storage disk file directly (with readStream() and writeStream()). Find out if this works and if yes, update the job.

Background: There was a case with a huge file where the locally available storage space was not sufficient. If everything is done directly in the storage disk, this would no longer be a problem.