Skip to content

Instantly share code, notes, and snippets.

@AndreasDickow
Created August 9, 2017 10:19
Show Gist options
  • Save AndreasDickow/4bde580c210c8bb636eb35463edd84ce to your computer and use it in GitHub Desktop.
Save AndreasDickow/4bde580c210c8bb636eb35463edd84ce to your computer and use it in GitHub Desktop.
Angular2 Image Upload to Django Rest Framework with FormData
class ProfileViewSet(viewsets.ModelViewSet):
parsers = [parsers.MultiPartParser, parsers.FormParser]
queryset = Profile.objects.all()
serializer_class = ProfileSerializer
permission_classes = [
user_permissions.IsProfileOwner
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment