title: Uploading files to different disks/directories on server with PHP
body: <p>I have a server with 2 disks. I want to upload files with PHP and let PHP dynamically choose a <code>upload_tmp_dir</code> directory on a disk where the file will be uploaded, either based on disk space or randomly, to reduce amount of IO per disk.  </p>
  
  <p>For example: if 5 file uploads are happening at the same time, PHP choose disk1 for upload 1 and 2, and disk2 for upload 3, 4, 5. Is that possible?  </p>
  
  <p>As I understand it: during upload, the file gets temporarily stored in the <code>upload_tmp_dir</code> directory. And after upload, file can be transferred to some other directory with <code>move_uploaded_file</code>.  </p>
  
  <p>But I want to let PHP first to check disk space of both disks, compare, and then proceed with uploading the file into the chosen disk - or choose a disk randomly. Is that possible? I have not seen PHP solutions like this.. But i want to keep disk IO to a minimum and utilize my disks as much as possible.</p>