I am trying to get the base64 encoding for a file when uploading in PHP using:
$sound = base64_encode( file_get_contents( $_FILES["sound"]["tmp_name"] ) );
but it's returning:
Notice: file_get_contents(): send of 8192 bytes failed with errno=104 Connection reset by peer
Is it possible to do this without saving the file to the server?