fixes filename encoding
This commit is contained in:
1 parent
c6f30c6f76
commit
0cd755fe8d
2 files changed
+6
-2
No files matched your search
@@ -7,6 +7,7 @@ from mimetypes import guess_type
|
||||
|
||||
import aiofiles
|
||||
from base58 import b58encode
|
||||
from base64 import b64decode
|
||||
from sanic import response
|
||||
|
||||
from app.core.logger import make_log
|
||||
@@ -34,6 +35,7 @@ async def s_api_v1_5_storage_post(request):
|
||||
return response.json({"error": "Invalid X-Content-SHA256 header format"}, status=400)
|
||||
|
||||
provided_filename = request.headers.get("X-File-Name")
|
||||
provided_filename = b64decode(provided_filename).decode("utf-8")
|
||||
|
||||
# Check if the file already exists in the database
|
||||
db_session = request.ctx.db_session
|
||||
|
||||
Reference in new issue
Block a user