i want to store uploaded files in mongodb as GridFsFile. Im using the doctrine 2 odm. it works fine when i read a file from disk and store it. But what i would like to achieve is to avoid storing the uploaded files anywhere on file system.
Is it possible to store the binary string directly?
According to the answer to this question, PHP always writes uploaded files to a temporary directory, and the
_FILESarray just points to those uploaded files.You might consider setting PHP's
upload_tmp_dirto a directory you've mounted astmpfsorramfsto avoid writing the files to disk. see here for a comparison of the two memory-based file systems.