comparison sat/plugins/plugin_comp_file_sharing.py @ 3301:9d1c0feba048

comp file sharing: file paths are now quoted on upload to allow unicode
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 14:56:45 +0200
parents 91b5ae058c66
children 5887fb414758
comparison
equal deleted inserted replaced
3300:b56e4c6b13fc 3301:9d1c0feba048
193 request.content = None 193 request.content = None
194 194
195 # the 2 following headers are not standard, but useful in the context of file 195 # the 2 following headers are not standard, but useful in the context of file
196 # sharing with HTTP Upload: first one allow uploaded to specify the path 196 # sharing with HTTP Upload: first one allow uploaded to specify the path
197 # and second one will disable public exposure of the file through HTTP 197 # and second one will disable public exposure of the file through HTTP
198 path = request.getHeader("Xmpp-File-Path") or "/uploads" 198 path = request.getHeader("Xmpp-File-Path")
199 if path:
200 path = unquote(path)
201 else:
202 path = "/uploads"
199 if request.getHeader("Xmpp-File-No-Http") is not None: 203 if request.getHeader("Xmpp-File-No-Http") is not None:
200 public_id = None 204 public_id = None
201 else: 205 else:
202 public_id = upload_id 206 public_id = upload_id
203 207