Re: How to save base64 string in Python django

2015-07-14 Thread Sadaf Noor
If you can avoid saving images to database then the solution would look like following where you are serving base64 url of image to reduce your website data bandwidth: 1. from django.db import models 2. class Photo( models.Model ): 3. title = models.CharField( max_length=255 ) 4. imag

Re: How to save base64 string in Python django

2015-07-14 Thread Bill Freeman
You don't show where the 'Image' object comes from (in Image.open), so I can't be specific, but here are some generalities: "Incorrect padding" is probably a message from the base 64 decoder. Capture your request.POST[photo] to play with separately. If you are doing this under the development ser