Fix image upload when UPLOAD_PATH_OBSCURIFY setting is enabled
Fix issues when downloading an attachment using Python 3