Programatically upload a file to be stored inside blob field in database, NOT on filesystem

After some further experimenting and talking to a colleague, we found the answer (team effort!) altering how the file handler deals with the file content.

        // Assign values required
        $wx_fileName = $_FILES['file']['name'][$i];
        $wx_fileMime = $_FILES['file']['type'][$i];
        $wx_fileSize = $_FILES['file']['size'][$i];
        $wx_tmpf = $_FILES['file']['tmp_name'][$i];
        //$wx_file = fopen($_FILES['file']['tmp_name'][$i], "rb");
        $wx_file = base64_encode(file_get_contents($_FILES['file']['tmp_name'][$i]));

Basically replacing fopen() with file_get_contents() and base64 encoding the stream. This worked (finally, yay!)