Closed elpiel closed 8 years ago
@twify93 this is very odd, the adapter implementation for is super straight forward. Perhaps you can check if the resource needs to be rewind
'ed before getting the contents? This could give us a clue and a possible fix.
@frankdejonge Yes indeed, this was the problem, but why is this issue here? I haven't read the stream and I can't find if the Adapter does it, it just gives the resource?
@twify93 it might be a bug in the SDK. I'll push a fix for this just in case.
version 1.0.4 is tagged which has this fix.
So I am using Rackspace with my Symfony2 project, The problem occurs when I want to read from stream:
The file is there, the $contents is shown as empty string. When I change
readStream()
toread()
, it dumps all the data of the jpg file, but no data withreadStream()
. Any idea why?PS: As per documentation in php.net, if
stream_get_contents
fails it will return FALSE not empty string. Also note thatwriteStream()
works just fine...