Commit 25fb5b06 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix name bug

parent 9a70dbcb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -88,6 +88,13 @@ def _join_parts(


def _get_user_from_request(request: HttpRequest) -> Union[User, None]:
    """
    Tries to find a user given the request. In this order:

    - try to find session user
    - try to find user associated with X-api-key header
    - try to find user corresponding to Authorization header
    """
    if request.user.is_authenticated:
        return request.user
    if "X-Api-Key" in request.headers:
@@ -225,6 +232,7 @@ def upload_partial(request: HttpRequest) -> HttpResponse:
    except KeyError:  # Content-length header is mandatory
        return HttpResponse("Length Required", status=411)

    # All chunks are complete, time to assemble
    if len(glob("{}/{}-*.part".format(partials_dir, total_chunks))) == int(
        total_chunks
    ):