1up-lab/OneupUploaderBundle — pull request #18 by m14t (2013-06-11 18:12:48+00:00)
Title: Fix RuntimeException: Could not read key content bug

When uploading a file with GaufretteStorage the file should be open for
writing, not appending. This makes sense for multiple reasons:

1. Since if we are uploading the same file twice, we likely want to
overwrite it, not append data to the existing file (much like how
'cp' works on file systems).
2. When uploading to Amazon S3, there is a condition where
Gaufrette\Stream\InMemoryBuffer::open thinks the file exists, but
calling `$this->filesystem->read($this->key);` throws an
`RuntimeException: Could not read key content` exception. Using a
write mode instead of append will pass the
impliesExistingContentDeletion test and avoid the read.