I'm trying to upload a picture with rest framework and to test it with the django test client. It almost works, however when I save the file I have this on the top of my file:

```
--BoUnDaRyStRiNg
Content-Disposition: form-data; name="plop.png"

```

If I delete those lines, I can perfectly read my picture, but I don't know how to rid of them.

models.py

```
class GenericUser(User):
    avatar = models.ImageField(upload_to=user_directory_path)

```

views.py

```
class AvatarView(APIView):
    parser_classes = (FileUploadParser,)
    def post(self, request):
        up_file = request.data['file']
        user = get_object_or_404(GenericUser, pk=request.user.id)
        user.avatar.save(up_file.name, up_file)
        user.save()
        return Response(status=204)

```

tests.py

```
cl = Client(HTTP_AUTHORIZATION="Token {}".format(token))
with open(MY_FILE, 'rb') as f:
    data = f.read()
res = cl.post('/avatar', {"plop.png" : data}, HTTP_CONTENT_DISPOSITION="attachment; filename=plop.png;")

```

any hints, how I could make this work?