Use fopen when calling ->putContent with a stream as parameter