Handling Errno::ENOMEM and Memory Management in Chunked File Uploads