[FIX] web: Impossible to add an attachment on Safari

Fine tuning of cd6150fe9e

opw:1840373
This commit is contained in:
Goffin Simon
2018-05-15 09:20:02 +02:00
parent d9fc5bca7e
commit 871387ca9e
+1 -1
View File
@@ -1116,7 +1116,7 @@ class Binary(http.Controller):
if request.httprequest.user_agent.browser == 'safari':
# Safari sends NFD UTF-8 (where é is composed by 'e' and [accent])
# we need to send it the same stuff, otherwise it'll fail
filename = unicodedata.normalize('NFD', ufile.filename).encode('UTF-8')
filename = unicodedata.normalize('NFD', ufile.filename)
try:
attachment = Model.create({