canvas-lms/gems/multipart
Jonathan Featherstone d96c958c11 Fix encoding problem on sequenced_stream
sequenced_stream becomes really confused when we attempt to post a file
that has non-ascii characters in the name. Add explicit conversion of
individual buffers to UTF-8 on read to prevent this issue.

Test Plan:
  * Configure local inst-fs with canvas (see readme in repo for
    instructions)
  * Open a canvas rails console
    `bundle exec rails c`
  * Run a manual inst-fs upload of a binary file (like a jpg) with
    non-ascii characters in the filename
```
InstFS.direct_upload(
  file_name: "祝贺.jpg",
  file_object: File.open("congrats.jpg")
)
```
  * Upload should complete without throwing

closes SAS-312
Change-Id: I724cf77701171074cfb5317c362c963d60ecc15f
Reviewed-on: https://gerrit.instructure.com/172075
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Huff <ahuff@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2018-11-12 23:31:07 +00:00
..
lib Fix encoding problem on sequenced_stream 2018-11-12 23:31:07 +00:00
spec restore and fix "stream inst-fs direct uploads" 2018-08-30 18:37:07 +00:00
.rspec extract multipart gem 2014-02-28 23:00:09 +00:00
Gemfile clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
Rakefile extract multipart gem 2014-02-28 23:00:09 +00:00
multipart.gemspec upgrade many canvas gems to rspec 3 syntax 2016-12-27 18:44:23 +00:00
test.sh simplify gem test harnesses 2016-01-19 17:52:58 +00:00