mirror of
https://github.com/etesync/server
synced 2024-11-29 12:08:07 +00:00
0585d6ee92
This restriction was unnecessary and annoying to deal with in clients.
15 lines
373 B
Python
15 lines
373 B
Python
from rest_framework.parsers import FileUploadParser
|
|
|
|
|
|
class ChunkUploadParser(FileUploadParser):
|
|
"""
|
|
Parser for chunk upload data.
|
|
"""
|
|
|
|
def get_filename(self, stream, media_type, parser_context):
|
|
"""
|
|
Detects the uploaded file name.
|
|
"""
|
|
view = parser_context["view"]
|
|
return parser_context["kwargs"][view.lookup_field]
|