Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
2.10.4
-
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
Description
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.`
Attachments
Issue Links
- is related to
-
RUBY-2227 Improve GridFS tutorial documentation
-
- Backlog
-
- links to