-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 2.10.4
-
Component/s: GridFS
-
Environment:Mac OS X, Ruby 2.1.10 (ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin19.0]), mongoid 5.4.1
-
Fully Compatible
This code fails :
```
grid = Mongoid.default_client.database.fs
file_name = 'test_fern.txt'
grid.open_upload_stream(file_name) do |stream|
stream.write('Fèrn')
end
grid.open_download_stream_by_name(file_name) do |stream|
puts stream.read
end
```
Whereas using 'Fern' succeeds. It's the presence of the special utf8 character that causes it to fail with this error:
`Mongo::Error::UnexpectedChunkLength:
Unexpected chunk length. Chunk has length 5 but expected length 261120 or for it to be the last chunk in the sequence.`
- is related to
-
RUBY-2227 Improve GridFS tutorial documentation
- Backlog
- links to