dirkmoors / drf-tus

A Tus (tus.io) library for Django Rest Framework
MIT License
24 stars 26 forks source link

Fix unicode errors #5

Closed jgeskens closed 6 years ago

jgeskens commented 6 years ago

When uploading a file whose filename contains weird (non-latin, unicode) characters, drf-tus crashes with a UnicodeDecodeError. This PR fixes this and modified the test in such a way that a more challenging filename is sent in the metadata.

codecov[bot] commented 6 years ago

Codecov Report

Merging #5 into master will decrease coverage by 0.32%. The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
- Coverage   91.38%   91.05%   -0.33%     
==========================================
  Files          21       20       -1     
  Lines         499      492       -7     
==========================================
- Hits          456      448       -8     
- Misses         43       44       +1
Impacted Files Coverage Δ
rest_framework_tus/middleware.py 97.53% <100%> (ø) :arrow_up:
rest_framework_tus/utils.py 78.57% <80%> (-2.14%) :arrow_down:
rest_framework_tus/settings.py 100% <0%> (ø) :arrow_up:
...ramework_tus/migrations/0003_auto_20170619_0358.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9914e6d...b107023. Read the comment docs.